note 97743 added to function.mktime

From: Date: Thu, 06 May 2010 00:13:08 +0000
Subject: note 97743 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-168992@lists.php.net to get a copy of this message
Compare time() to file modified time and if difference is greater than X, execute. <?php $x = 3600; // Seconds, 3600 = one hour. $filename = "test.txt"; // File comparing against. if(time()-filemtime($filename) >= $x) { echo "It has been $x seconds since you last visited."; } else { echo "Perhaps you should come back again."; } ?> ---- Server IP: 78.110.173.36 Probable Submitter: 94.15.48.50 ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- https://master.php.net/note/edit/97743 Del: integrated -- https://master.php.net/note/delete/97743/integrated Del: useless -- https://master.php.net/note/delete/97743/useless Del: bad code -- https://master.php.net/note/delete/97743/bad+code Del: spam -- https://master.php.net/note/delete/97743/spam Del: non-english -- https://master.php.net/note/delete/97743/non-english Del: in docs -- https://master.php.net/note/delete/97743/in+docs Del: other reasons-- https://master.php.net/note/delete/97743 Reject -- https://master.php.net/note/reject/97743 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168992) next »