webguync Posted December 30, 2010 Share Posted December 30, 2010 I have a small script on the bottom of all my pages on my site which list the date and time the page was modified. I want to make the script an include and just put that on the page, but as it is now scripted that won't work since you have to change the page name for every page. Is there a way to change this so it can be an include? $last_modified = filemtime("pagename.php"); print("Last Modified "); print(date("m/j/y h:i", $last_modified));?> Quote Link to comment Share on other sites More sharing options...
mikecampbell Posted December 30, 2010 Share Posted December 30, 2010 $last_modified = filemtime($_SERVER['SCRIPT_FILENAME']); Quote Link to comment Share on other sites More sharing options...
webguync Posted December 30, 2010 Author Share Posted December 30, 2010 awesome thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.