filemtime() function
<?php $file_path = 'example.txt'; $file_modified_time = filemtime($file_path); $current_time = time(); if ($file_modified_time > $current_time - 3600) { echo "The file has been modified within the last hour."; } else { echo "The file has not been modified within the last hour."; } ?>