The created object uses filectime to obtain the created time t2. why t1t2 ?? Is to create...
Php creates a file named test.html and obtains the creation time t1 using filectime.
Php deletes a file named test.html
Php re-creates a file named test.
1, fileatime () int fileatime (String filename): the Fileatime () function returns the last time the filename was accessed, where the last access refers to the time when the data block of a file is read, using the UNIX timestamp format , returns
Fileatim (): Last accessed by file
Filemtime () is the time the file was last modified
Filectime () The time the file was created (permissions for the file, time the owner changed)
Code:$path 3 = ' test.txt ';Date_default_timezone_set ('
Environment: CentOS6.5 use php to obtain the file modification time. The result is 1970. why? Code: {code...} result: The time between... and... is normal. thank you!
Environment: CentOS6.5When php is used to obtain the file modification time, the
System files: during development, we sometimes need to know the last access time of the file and the last modification time of the file, and introduce the access to the identified files provided by PHP, three functions of the creation and last
System files: In development we sometimes need to know the last access time of the file and the last modified time of the file, and introduce the 3 functions that PHP provides to determine the access, creation, and last modification time of the file:
PHP gets file creation time, modified time common code
Filemtime (string filename)
returns the time when the file was last modified, FALSE when an error occurred. Time is returned as a Unix timestamp and can be used for date ().
For example:
PHP Get file creation time, modification time common code
Filemtime (string filename) returns the time when the file was last modified and FALSE on error. Time is returned as a Unix timestamp and can be used with date (). For example: $a =filemtime
A Directory Operations
BaseName--Returns the file name portion of the path
DirName--Returns the directory portion of the path
PathInfo--Returns information about the file path
Realpath--Returns the normalized absolute path name
Copy CodeThe code is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.