Creating a directory
bool mkdir ( string pathname [, int mode [, bool recursive [, resource context]]] )
the function mkdir is used to create a directory in the system.
a simple step to create a directory.
<?php
mkdir(”/path/user/dir_new”);
?>
The above script will create a directory “dir_new” under the existing directory “user”.
File permission for directory
we can give the permission to the directory by specifying it in the mode field.
<?php
mkdir(”/path/user/dir_new”,0777);
?>
the permission 0777 is octal specification , which is the best method
to specify the permission then as decimal 777.
