The mkdir() function creates a directory.Returns TRUE on success or FALSE on failure.
bool mkdir ( string $pathname [, int $mode = 0777 [, bool $recursive = FALSE [, resource $context ]]] )
Attempts to create the directory specified by pathname.
Parameter | Description |
---|---|
pathname | The directory path. |
mode | The mode is 0777 by default, which means the widest possible access. For more information on modes, read the details on the chmod() page. |
recursive | Allows the creation of nested directories specified in the pathname. |
context | Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream (added in PHP 5) |