How to create a folder and make its permission 0777 with PHP
Thursday, November 5th, 2009Last day, I were testing my CMS interaface on several web browsers. It was working as I expected, except on Internet Explorer. Somehow, although I got “folder is created-file is uploaded” message, I couldn’t find the files and folder on server. This weird problem only occured on Internet Explorer. First, I thought that it can be a Mac OSX problem. So, I tried uplaoding stuff with a PC with Windows XP and Vista. But nothing was change!
Secondly, I checked my PHP files. I am requesting PHP files from Flash interface, and PHP tells to server what to do…etc… My problem was related with PHP file. My php code’s related section is as follows;
mkdir($folder, 0777);
I have no idea about that. When I changed it as follows, It started to work on Internet Explorer. Anyway. Hope it helps someone.
mkdir($folder);
chmod($folder, 0777);