PHP file access function introduction. The code for copying the code is as follows: ** substr returns the substring of the string * base_convert converts the number to any number * fileperms to obtain the file permission * obtains the permission functiongetCh
The code is as follows:
/*
* Substr returns the substring of the string.
* Base_convert converts numbers in any expected hexadecimal format.
* Fileperms obtains the file permission.
*/
// Obtain permissions
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 string's substring * base_convert converts the number between any expected formats * fileperms obtains the file permission * // gets the permission function getCh...