note 82017 deleted from function.mkdir by nlopess

From: Date: Tue, 25 Mar 2008 00:06:52 +0000
Subject: note 82017 deleted from function.mkdir by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-137535@lists.php.net to get a copy of this message
Note Submitter: Marcelo Paniza ---- Greetings, If you are on linux having trouble with this message: Warning: mkdir() [function.mkdir]: Permission denied <something> Please know that you actually need to create the folders with the permissions 0755 or it won't work. I tried before with 0666 but looks like this command was only able to write the first level of folder. After changing to 0755, everything worked as they should. I executed some thing like this: $mydir="/home/something/public_html/folder1/folder2/folder3"; if (!is_dir($mydir)) { mkdir ($mydir, 0755, true); } This created folder3 inside of folder2 inside of folder1 inside of public_html. Cheers, Marcelo http://www.operationto.com

« previous php.notes (#137535) next »