Page 1 of 1

MKDIR Troubles

Posted: Thu Oct 05, 2006 9:20 pm
by LiveFree
Hello,

I seem to be running into an odd issue. A previous coder was able to create directories sucessfully by using:

Code: Select all

$dir = 'pending/' . date('l \\t\h\e jS \of F Y g:i  a').'/'; 
mkdir($dir);
And yet I cant make a dir using

Code: Select all

mkdir('/members/Test/');
mkdir('/members/Test/cp/');
mkdir('/members/Test/profile/');
The 3 dirs I am trying to create are the test dir, test/cp, and test/profile

Any reason why example #1 works but #2 doesnt?

BTW- Example #2 is based in the doc root.

Posted: Thu Oct 05, 2006 9:22 pm
by waradmin
Isnt there not supposed to be a trailing /?

Re: MKDIR Troubles

Posted: Thu Oct 05, 2006 9:24 pm
by volka
LiveFree wrote:BTW- Example #2 is based in the doc root.
meaning?

/members/Test/
the leading / makes it an absolute path in the local filesystem. Is there a directory members in the server's root directory? (root != document_root)