ted_chou12 Posted December 12, 2006 Share Posted December 12, 2006 For some reason I cant seem to get filectime() & filemtime() to work, what it displays, is a very ancient time, something like 1966 June or something... can anyone solve this freaky problem for me..? ???Thanks Link to comment https://forums.phpfreaks.com/topic/30375-file-creation-time/ Share on other sites More sharing options...
hitman6003 Posted December 12, 2006 Share Posted December 12, 2006 What code are you using?Are you using the full path to the file or a relative path? On some servers I have had problems using a relative path, but it works with the full path. Link to comment https://forums.phpfreaks.com/topic/30375-file-creation-time/#findComment-139760 Share on other sites More sharing options...
ted_chou12 Posted December 12, 2006 Author Share Posted December 12, 2006 I think i used the relative path to the file, which looks something like this: "myfolder/..." (btw, by full path do you mean with the "http://..." or with a slash in the front, like "/myfolder/...")Thanks Link to comment https://forums.phpfreaks.com/topic/30375-file-creation-time/#findComment-139762 Share on other sites More sharing options...
hitman6003 Posted December 12, 2006 Share Posted December 12, 2006 Use realpath and pass the result of that to your function.http://www.php.net/realpath[code]echo date("Y-m-d H:i:s", filemtime(realpath("../somefile.txt")));[/code] Link to comment https://forums.phpfreaks.com/topic/30375-file-creation-time/#findComment-139765 Share on other sites More sharing options...
ted_chou12 Posted December 12, 2006 Author Share Posted December 12, 2006 okay, thanks for your help, really loved it :D Link to comment https://forums.phpfreaks.com/topic/30375-file-creation-time/#findComment-139767 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.