The code is as follows: ** substr returns the string's substring * base_convert converts the number * fileperms to any number in any expected notation to obtain the file permission * www. bkjia. comtruewww. the bkjia code is as follows:/** substr returns the substring * base_convert of the string to convert the number * fileperms to get the file permission * // obtain the permission function getChmod ($ filepath) {return substr (base_convert (@ fileperms ($ filepath), 10, 8),-4);} the http://www.bkjia.com/PHPjc/328051.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/328051.htmlTechArticle code is as follows: /** substr returns the substring of the string * base_convert to convert the number * filepe
1. PHP file access function introduction _ PHP Tutorial
Introduction: PHP file access function introduction. The code is as follows:/** substr returns the string's substring * base_convert converts the number * fileperms to any number in any expected notation to obtain the file permission * // gets the permission function getCh
2. php-related system function _ PHP Tutorial
Introduction: php-related system functions. Get_current_user () get the name of the current PHP script owner substr (sprintf (% o, fileperms (getcwd (),-4) get the current file/directory permission scandir (getcwd () to get all
3. php-related system functions
Introduction: php-related system functions. Get_current_user () get the name of the current PHP script owner substr (sprintf (% o, fileperms (getcwd (),-4) get the current file/directory permission scandir (getcwd () to get all
4. PHP reads and writes files or folders.
Introduction: Welcome to the Linux community forum and interact with 2 million technical staff> In this article, we will share a function that can obtain the server-side file or file read/write permissions. I hope it will help you. PHP function :? Php function file_permission ($ filename) {$ perms = fileperms ($ filename); if ($ perms 0xC000)
The above is a detailed article about the php fileperms () function. For more information, see other related articles in the first PHP community!