PHP Gets the file attributes last modified time:
- < ? PHP
- $ file ' test.txt ';
Filemtime ($file));
- ?>
Returns a timestamp that says Unix, which is commonly used in caching techniques.
The relevant PHP gets the file attributes of the last accessed time Fileatime (), Filectime () when the permissions of the file, owner, all groups or other inode metadata is updated time, Fileowner () function returns the file owner
$owner = Posix_getpwuid (Fileowner ($file));
(Non-Window System), Ileperms () Gets the file permissions,
- < ? PHP
- $ file ' dirlist.php ';
- $ perms substr(sprintf
('%o ', Fileperms ($file))
,-4);
- Echo $perms;
- ?>
FileSize () returns the number of bytes in the file size:
- < ? PHP
- Output similar to: Somefile.txt:
1024x768 bytes
- $ filename ' somefile.txt ';
. FileSize ($filename). ' bytes ';
- ?>
PHP gets all the information about the properties of a file with a function stat () function that returns an array:
- < ? PHP
- $ file ' dirlist.php ';
- $ perms stat($file);
- Var_dump ($perms);
- ?>
http://www.bkjia.com/PHPjc/445971.html www.bkjia.com true http://www.bkjia.com/PHPjc/445971.html techarticle php Gets the file attributes of the last modified time: PHP $ file = ' Test.txt '; Echodate (' R ', Filemtime ($file)); return the Unix timestamp, which is commonly used in caching techniques. Related PHP get ...