In my code
$path = 'images/product/'.$pid;
if( ! file_exists($path)) {
mkdir($path, 0777);
}
...
...
but when I type
ls -l
in terminal
drwxr-xr-x 2 www-data www-data 4.0K 2011-12-10 19:28 1/
This is the permission that I get, but is not I want.
I want to allow web user to upload the project based on the product ID (directory) that created during runtime.
How can I do so?
For creating directories with 777 permissions,or any permissions
$path = 'images/product/'.$pid;
if( ! file_exists($path)) {
$mask=umask(0);
mkdir($path, 0777);
umask($mask);
}
...