Php filemtime-Get file modification time
Filemtime(PHP 4 and PHP 5)Filemtime-Get file modification timeDescriptionInternational filemtime (string $ file name)When this function is returned, the data block file is written, which is the content file
Filemtime(PHP 4 and PHP 5)Filemtime-get file modification timeDescriptionInternational filemtime (string $ file name)When this function is returned, the data block file is written, which is the content file changed at that time.ParametersFile
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
Definition and usage
The filemtime () function returns the last modification time of the file content.
If successful, the time is returned in Unix timestamp format. If it fails, false is returned.
Syntax
Filemtime (filename)
Parameters
Definitions and usage
The Filemtime () function returns the last time a file's content was modified.
If successful, the time is returned as a Unix timestamp. Returns False if the failure occurs.
Grammar
Filemtime (filename)
Parameters
The filemtime () function returns the last modification time of the file content.Definition and usageThe filemtime () function returns the last modification time of the file content.
If successful, the time is returned in UNIX timestamp format. If
Int
Filemtime(String filename)
Returns the time when the file was last modified.False. Time is returned in UNIX timestamp format and can be usedDate ().
Note:The result of this function is cached. For more information, seeClearstatcache ().
Note:
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 ('
The filemtime () function returns the last modification time of the file content.If successful, the time is returned in Unix timestamp format. If it fails, false is returned.SyntaxFilemtime (filename)$ Path = "a.txt ";If (file_exists ($ path )){ $
The Fileatime () function returns the last access time for the specified file.
This function returns the last time the file was accessed. Returns False if an error occurs. Time is returned as a Unix timestamp.
The Filectime () function returns
Phpfilemtime-get the file modification time. Phpfilemtime-get file modification time filemtime (in PHP4, in PHP5) filemtime-get file modification time Description International filemtime (string $ file name) when this function returns php
I want to realize the filemtime of the folder every 5 seconds, and then through 2 times the similarities and differences between filemtime to achieve its function.
$filetime1 = filemtime("PATH.txt");sleep(10);$filetime2 = filemtime("Path.txt"),
Array_key_exists () defines and uses the array_key_exists () function to determine whether a specified key exists in an array, returns TRUE if the key exists, or false otherwise. The syntax array_key_exists (key,array) parameter describes key
PHP$filename= "./jingtai.html";//define a variable to hold the path to a cached file (relative to the path of the current page)//define the cache validity period $cachetime= 10; //determine if the cache file exists Var_dump(Filemtime($filename)
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.