Easy Tutorial
❮ Filter Sanitize Number Int Func Date Timezone Version Get ❯

PHP fileperms() Function



Definition and Usage

The fileperms() function returns the permissions of a file or directory.

If successful, the function returns the permissions in numeric form. If it fails, it returns FALSE.

Syntax

Parameter Description
filename Required. Specifies the file to check.

Tips and Notes

Note: The result of this function is cached. Use clearstatcache() to clear the cache.


Example 1

The above code will output:


Example 2

Display permissions in octal value:

The above code will output:


❮ Filter Sanitize Number Int Func Date Timezone Version Get ❯