We have a PHP script to check the dates on files hosted on our server to check they are being updated regularly. We need to know if the files haven't been updated for over 24 hours. Presently the script just shows the date and time of the last upload but we need it to highlight the text in red if the file is more than 24 hours old.
Here is the code that we use:
$filename = 'filename.csv';
if (file_exists($filename)) {
echo "<img src='images/image.jpg' width=200> ".date ("D d F Y H:i:s", filemtime($filename));
}
Thanks.