Saturday, 7 September 2013

Why in PHP if you use Mkdir recursive flag do the nest directories not chmod?

Why in PHP if you use Mkdir recursive flag do the nest directories not chmod?

I am using mkdir to create normally 2 nested directories for a file
structure. The directories it creates are always set to 0755. The code I
am using however is.
mkdir('path_one/path_two', 0777, true);
I have tried then doing
chmod('path_one/path_two', 0777);
but that only sets the final directory as 0777. What would cause mkdir not
to function properly?

No comments:

Post a Comment