Name

mkdir

Synopsis

bool mkdir(string path[, int mode [, bool recursive [, resource context ]]])

Creates the directory path with mode permissions. The mode is expected to be an octal number such as 0755. An integer value such as 755 or a string value such as “u+x” will not work as expected. Returns true if the operation was successful and false if not. If recursive is used, it allows for the creation of nested directories.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.