|
Posted by Schraalhans Keukenmeester on 05/23/07 19:31
At Wed, 23 May 2007 17:22:28 +0000, harvey let his monkeys type:
>
> I'm not sure if this is a linux, apache or PHP problem but I'm using PHP
> to do it so I'll start here:
>
> if I do
> $myDir = '/temp/';
>
> mkdir($myDir,0777);
> chmod($myDir,0777);
>
> I get a directory with 777 permissions. That seems fine.
> (The chmod seems needed to undo a mask)
> The directory is created with owner & user as Apache
>
> However if I now do:
>
>
> if (!mkdir($myDir . 'subDir/',0777)) {
> echo('Creation error');
> }
> chmod($myDir . 'subDir/',0777);
>
> I've tried removing the trailing slash to no effect.
>
> PHP fails to create subDir/ at all AND doesn't flag up the error.
> I expect I'm missing something fundamental but can't see what.
>
> Can anyone help please?
Maybe to do with the trailing '/'
Have a look at the user comments at:
http://www.php.net/manual/en/function.mkdir.php
HTH
Sh
Navigation:
[Reply to this message]
|