Name

chmod

Synopsis

bool chmod(string path, int mode)

Attempts to change the permissions of path to mode. 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.

Get Programming PHP, 2nd 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.