Creating Folders/Directories
Posted: Thu Jul 22, 2004 4:17 am
Greetings,
I am trying to create folders using my script.
if $uid = 1 and $c_id = 2 are the values, folder "..../thumb/1" and folder "..../full/1" are created. But not " "..../full/1/1" and "..../thumb/1/1".
Here "full" and "thumb" both have 0777 chmod.
Script is giving error like mkdir(): SAFE MODE Restriction in effect.
What can be the problem?
Thanks for reading this far.
Kevin.
I am trying to create folders using my script.
Code: Select all
<?php
if (!is_dir("full/$uid"))
{
$oldmask = umask(0);
mkdir("full/$uid",0777);
umask($oldmask);
}
if (!is_dir("thumb/$uid"))
{
$oldmask = umask(0);
mkdir("thumb/$uid",0777);
umask($oldmask);
}
if (!is_dir("full/$uid/$c_id"))
{
$oldmask = umask(0);
mkdir("full/$uid/$c_id",0777);
umask($oldmask);
}
if (!is_dir("thumb/$uid/$c_id"))
{
$oldmask = umask(0);
mkdir("thumb/$uid/$c_id",0777);
umask($oldmask);
}
?>Here "full" and "thumb" both have 0777 chmod.
Script is giving error like mkdir(): SAFE MODE Restriction in effect.
What can be the problem?
Thanks for reading this far.
Kevin.