Easy Tutorial
❮ Func Math Sin Php Floatval Function ❯

PHP mkdir() Function



Definition and Usage

The mkdir() function creates a directory.

The function returns TRUE on success and FALSE on failure.

Syntax

Parameter Description
path Required. Specifies the name of the directory to be created.
mode Optional. Specifies the permissions. Default is 0777 (world-wide access). The mode parameter consists of four numbers: The first number is always 0. The second number specifies permissions for the owner. The third number specifies permissions for the owner's group. The fourth number specifies permissions for everyone else. Possible values (sum the following numbers to set multiple permissions): 1 = execute permission, 2 = write permission, 4 = read permission.
recursive Optional. Specifies whether to enable recursive mode. (Added in PHP 5)
context Optional. 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)

Tips and Notes

Note: The mode parameter is ignored on Windows platforms.


Examples


❮ Func Math Sin Php Floatval Function ❯