php - mkdir() not creating folder on linux server -
OK, I was working on my local server, which was Windows Server 2012, although when I hosted hosting I'm on the Linux server now.
Code:
$ target_dir = "docs" "/"; // IF / ELSE folder is already created ... if (! File_exists ($ target_dir. Ref. "/")) {// Create name 1 folder inside the Customer Ref folder. Mkdir ($ target_dir. $ Ref. "/" "1". "/", 0775, true); $ Count = 0; } Else {// Create a new folder inside the customer's RFC folder / count within folders / docs / $ ref / $ find_folders = glob ($ target_dir. $ Ref. "/". "*", GLOB_ONLYDIR); $ Count = count ($ find_folders); // $ 1 $ new_folder = $ count increase to $ 1, make $ ref / new folder using grid + 1; Mkdir ($ target_dir. $ Ref. "/". $ New_folder. "/", 0775, true); } // If count is present then $ target_file changes in new folder ... if ($ count> 0) {$ target_file = $ target_dir $ ref "/" $ New_folder "/"; } Else {// and use the first directory target_file = $ target_dir $ ref "/" "1" "/"; }
You were seeing every one "/" on my Windows server that I was using DIRECTORY_SEPARATOR, but had to convert Uncompressed Linux to Forward Slash. This is not working anymore why anybody die?
Comments
Post a Comment