PHP - auto detect when/if files have been updated
php
Solution
A PHP script would not be able to automatically detect changes to files because the page has to be requested. You could write a script and run a cron (scheduled task) to run every so often. Or use filemtime() as others have suggested.
Problem
Is there a way in PHP to detect when a file is updated and saved? If not what would be the best method 'faking' this. I.e. before a certain action if executed, check the last saved date of the file?