Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mkdir() help

Status
Not open for further replies.

rockstardub

Programmer
Dec 29, 2004
42
US
I'm having problems at every turn and have found no help online.

Code:
<? 

$path = "/newdir";
if(!mkdir($path, 0700)) {
    echo ("Couldn't create directory");
}

?>

I always get problems, and I don't know what to do.
 
'having problems at every turn' and 'always get problems' is just a little too vague. Could you tell us what exactly the problems are?
 
I guess it wasn't clear
I just want a script that works.

I talked to a friend and found out how to do it,

Code:
<? 

$path = "/newdir";
if(!mkdir($path, 0700)) {
echo ("Couldn't create directory");
}

?>

but now I have a similar problem.

The script only works with certian permissions.
How do I automatically set the privileges of the directory so that this script works? or what permissions should be set (besides all access)?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top