September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool mkdir(string dir, int mode)
Creates a directory.
Returns:
TRUE on success; FALSE on failure
Description:
Creates a directory with permissions as specified by the umask. The function returns an error if directory creation failed due to safe mode being in effect or permission problems. Note that you probably want to specify the mode as an octal number, so it should have a leading zero.
Example:
$path = "/home/user/newdir";
if(!mkdir($path, 0700))
{
echo ("Couldn't create directory");
}
|
Read now
Unlock full access