PHP interferes with lastModified function

I have found a useful script at http://www.whytehouse.com/lastmodified.html which shows the date a page was last modified. I have put it at http://www.pfwd.co.uk/last-modified/date-last-modified.htm where it works perfectly. But the same script with a PHP file extension as here http://www.pfwd.co.uk/last-modified/date-last-modified.php only shows the current time. There is no PHP in the page, but somehow the PHP processor seems to be upsetting it.

Are you using PHP’s header command to tell PHP to write a Last Modified header? If you want it to reflect the time the file was updated, you’ll have to write the header in PHP itself to retrieve that time from the file information and write it into the header.