Home > Php > Creating directories in php with mkdir()

Creating directories in php with mkdir()

January 7th, 2010 Leave a comment Go to comments    

mkdir() php function enables you to create a directory. mkdir() requires a string representing the path to the directory you want to create and an integer that should be an octal number representing the mode you want to set for the directory. You specify an octal (base 8) number with a leading 0. The mode argument has an effect only on Unix systems.

mkdir( "testdir", 0777 ); // global read/write/execute permissions
mkdir( "testdir", 0755 ); // world and group: read/execute only
             // owner: read/write/execute

Categories: Php Tags:
  1. No comments yet.
  1. No trackbacks yet.