whatap Posted February 15, 2007 Share Posted February 15, 2007 Hello, I've been trying to get my upload script to display the time and date files are uploaded through my upload script. I just can't get it working. I've tried to make the script touch the file right after it's uploaded and display the date the file was modified as a workaround, but everything I do displays the date as 1969-12-31 18:00. Can anyone give me some insight as to how I can correctly show the time files are uploaded? Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted February 15, 2007 Share Posted February 15, 2007 What code are you using? Quote Link to comment Share on other sites More sharing options...
spfoonnewb Posted February 15, 2007 Share Posted February 15, 2007 PHP does that when it cannot find the file. This code will display the last modified, the file needs to exist on the server, or you will get: Page Last Edited 12/31/69 04:00 So either it doesn't exist, or your path is incorrect. <?php $last_modified = filemtime("index.php"); print("Page Last Edited"); print(date("m/j/y h:i", $last_modified)); ?> 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.