The fileperms() function returns the permissions for a file or directory.
This function returns the permission as a number on success or FALSE on failure.
Parameter | Description |
---|---|
filename | Required. Specifies the file to check |
Note: The result of this function are cached. Use clearstatcache() to clear the cache.
The output of the code above could be:
Display permissions as an octal value:
The output of the code above could be: