How to get last modified information of a file using PHP ?
The filemtime() function is an inbuilt function that returns the last modification of the file content. It returns as a UNIX timestamp of the last modification time of a file and returns false on failure. The filename is passed by filemtime() as a parameter. The output of this feature is cached. To clear the cache, use the clearstatcache() command.
filemtime( filepath );
Parameter: This function accepts single parameter as mentioned above and described below:
filepath: It specifies the path to the file to check. It is required parameter.
Return Value: It returns the last time the file was modified, or false when the failure occurred. The time will be returned as a Unix timestamp that is appropriate for the date() function.
Output: Last time of file change: September 11 2020 09:55:51