PHP » GoLang |
login |
register |
about
|
fileperms(PHP 4, PHP 5, PHP 7) fileperms — Gets file permissions Description
int fileperms
( string
$filename
)Gets permissions for the given file. Parameters
Return Values
Returns the file's permissions as a numeric mode. Lower bits of this mode
are the same as the permissions expected by chmod(),
however on most platforms the return value will also include information on
the type of file given as For local files, the specific return value is that of the st_mode member of the structure returned by the C library's stat() function. Exactly which bits are set can vary from platform to platform, and looking up your specific platform's documentation is recommended if parsing the non-permission bits of the return value is required. Examples
Example #1 Display permissions as an octal value
<?php The above example will output: 1777 0644 Example #2 Display full permissions
<?php The above example will output: -rw-r--r-- Errors/Exceptions
Upon failure, an Notes
Tip
As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to Supported Protocols and Wrappers to determine which wrappers support stat() family of functionality. See Also
|
more
Recently updated
more
Most requested
more
Last requests
|