|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-06-18 14:36 UTC] iliaa@php.net
[2003-06-26 18:22 UTC] sniper@php.net
[2003-06-27 02:55 UTC] mf22cs at student dot hik dot se
[2003-07-07 19:38 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 12 21:00:01 2025 UTC |
Description: ------------ getlastmod() gives the correct result on my localhost (which is at WinXP running IIS 5.1 with PHP4.3.2). But on the Linux webserver (running Apache 1.3.27 and PHP4.3.1) it gives a totally wrond result (that seems to be the last accesstime). Then I tried the filemtime(string) instead, but then my localhost got all crazy. It showed the birthdate of UNIX instead. Reproduce code: --------------- GLM: <?php echo date("d-m-Y H:i:s",getlastmod()); ?> <br/>FMT: <?php echo date("d-m-Y H:i:s",filemtime(trim($_SERVER["SCRIPT_FILENAME"]))); ?> Expected result: ---------------- GLM: 17-06-2003 01:20:55 FMT: 17-06-2003 01:20:55 at both systems (if that is the correct date/time of modification). Actual result: -------------- At the server this gives the following result: GLM: 17-06-2003 01:11:35 FMT:17-06-2003 01:18:23 And at local host: GLM: 17-06-2003 01:18:21 FMT:01-01-1970 01:00:00