Use fileperms() function
clearstatcache();
echo substr(sprintf('%o', fileperms('/etc/passwd')), -4);
More Related Contents:
- How to set up file permissions for Laravel?
- move_uploaded_file gives “failed to open stream: Permission denied” error
- How do I give PHP write access to a directory?
- file_put_contents – failed to open stream: Permission denied
- How to create this type of JSON data from PHP [closed]
- How to code in php of calculating the difference?
- How do I implement basic “Long Polling”?
- Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php [duplicate]
- What are the best practices for avoiding xss attacks in a PHP site [closed]
- Modify array values in foreach loop
- PHP regular expressions: No ending delimiter ‘^’ found in
- How to minify php page html output?
- How to attach two or multiple files and send mail in PHP [duplicate]
- SHA1 vs md5 vs SHA256: which to use for a PHP login?
- Javascript equivalent of PHP’s list()
- Convert flat array to the multi-dimensional
- SSL operation failed with code 1: dh key too small
- Can’t pass mysqli connection in session in php
- How to echo out table rows from the db (php)
- Multi-line strings in PHP
- Using usort in php with a class private function
- Post to a facebook page without “manage_pages” permission using php
- Cast the current object ($this) to a descendent class
- how to run a .sh file from php?
- How to display PHP & HTML source code on a page?
- Getting node’s text in PHP DOM
- Recursive File Search (PHP)
- WordPress Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /wp-includes/wp-db.php:1570
- How to always use ignore-platform-reqs flag when running composer?
- passing php string with multiple lines to a javascript function/variable