Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP fileperms() Function

PHP fileperms() Function


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual


Definition and Usage

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

Returns the permissions as a number on success, or FALSE on failure.

Syntax

fileperms(filename)

Parameters Description
filename Required. Specifies the file to check.

Tips and Notes

**Note:** The results of this function are cached. Use clearstatcache() to clear the cache.


Example 1

The code above will output:

33206


Example 2

Display permissions as an octal value:

The code above will output:

1777


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual