php method to modify file creation time: first create a PHP sample file; then enter the content "touch("test.txt",mktime(19,5,10,10,26,2013));" ;Finally execute the file in the browser.
Recommended: "PHP Video Tutorial"
php modify the creation time of the file
Change the last modified time of test.txt to 19:05:10 on October 26, 2013
<?php touch("test.txt",mktime(19,5,10,10,26,2013)); ?>
Related introduction:
mktime() function Returns the UNIX timestamp of a date.
Tip: This function is the same as gmmktime(), except that the parameter passed represents a date (not a GMT date).
Syntax
mktime(hour,minute,second,month,day,year,is_dst);
touch() function sets the access and modification time of the specified file.
If successful, this function returns TRUE. On failure, returns FALSE.
Grammar
touch(filename,time,atime)
The above is the detailed content of How to modify the creation time of a file in php. For more information, please follow other related articles on the PHP Chinese website!