I am working on a php code as shown below:
$src_dir = ('\\\INVEST-ST-001\test\podcast\incoming_folder');
$mp4_files = preg_grep('~\.(mp4)$~', scandir($src_dir));
$file = $mp4_files[$key];
print_r($file); // Line A
echo date("F d Y", filemtime("$file")); echo "\t"; echo date("H:i:s", filemtime("$file")); // Line D
Line A returns the following values:
36031P.mp4 hello.mp4
The above 2 files are placed inside incoming_folder. Last Modified Dates for the above 2 files are:
1/05/2019 2:56 PM
30/04/2019 10:21 AM
I have used Line D to return the last modified date on the webpage but I am getting the following garbage dates instead of the actual dates above:
December 31 1969 19:00:00
December 31 1969 19:00:00
Problem Statement:
I am wondering what changes I should make at Line D so that it returns proper Last Modified Dates for the above 2 files.