[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[3]: [cobalt-users] PHP question



>><?
>> mkdir ("/test", 0777);
>>?>
>>Returns the error "Warning: MkDir failed (Permission denied)"
>>I might take it to a PHP mailing list. Apparently the same script
>>has
>>worked elsewhere.

Here's a chunk of code from one of my scripts that I've written that works on the RaQ. Note that I feed the mkdir command a variable rather than the exact directory. The directory I want made is stated as a variable before the command.
if ($process=="add"){
$dir="../photos/$cat_folder";
if (!file_exists($dir)) { 
$oldumask = umask(0); 
mkdir("$dir", 0777) or die ("Couldn't make the folder.");
umask($oldumask);
} 

So have them try defining the variable as I've done and then passing the command. Also check the umask that I've got set - if you don't, you won't end up with 777 as the permission of the folder. 
--
CarrieB