note 74240 added to function.touch
| From: | seocab at rit dot edu | Date: | Sat, 31 Mar 2007 16:09:52 +0000 |
| Subject: | note 74240 added to function.touch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124974@lists.php.net to get a copy of this message | ||
The script for modifying the access time without modifying the modified time is overly complicated:
<? touch($filename, date('U', filemtime($filename)), time()); ?>
Since filemtime returns a UNIX timestamp, there is no need to call date('U') so the script
could be simplified to:
<? touch($filename,filemtime($filename),time()); ?>
----
Server IP: 64.71.164.2
Probable Submitter: 129.21.141.57
----
Manual Page -- http://www.php.net/manual/en/function.touch.php
Edit -- https://master.php.net/note/edit/74240
Del: integrated -- https://master.php.net/note/delete/74240/integrated
Del: useless -- https://master.php.net/note/delete/74240/useless
Del: bad code -- https://master.php.net/note/delete/74240/bad+code
Del: spam -- https://master.php.net/note/delete/74240/spam
Del: non-english -- https://master.php.net/note/delete/74240/non-english
Del: in docs -- https://master.php.net/note/delete/74240/in+docs
Del: other reasons-- https://master.php.net/note/delete/74240
Reject -- https://master.php.net/note/reject/74240
Search -- https://master.php.net/manage/user-notes.php