note 75271 added to function.touch

From: Date: Mon, 21 May 2007 15:10:39 +0000
Subject: note 75271 added to function.touch
Groups: php.notes 
Request: Send a blank email to php-notes+get-126799@lists.php.net to get a copy of this message
Feathern wrote a little script for fetching files from a directory after a certain date. However the if statement (line 8) should be: if(($test[2] > 2002) || (($test[2] = 2002) && ($test[0] > 6)) || (($test[2] = 2002) && ($test[0] = 6) && ($test[1] > 17))){ echo $filelist[$i]."\r\n"; } Otherwise the script won't fetch lots of files it should. (In the example given, it should fetch all the files created after 06/17/2002, but the original script would miss files created 03/18/2003 or 11/01/2004) ---- Server IP: 213.92.11.19 Probable Submitter: 192.167.199.165 ---- Manual Page -- http://www.php.net/manual/en/function.touch.php Edit -- https://master.php.net/note/edit/75271 Del: integrated -- https://master.php.net/note/delete/75271/integrated Del: useless -- https://master.php.net/note/delete/75271/useless Del: bad code -- https://master.php.net/note/delete/75271/bad+code Del: spam -- https://master.php.net/note/delete/75271/spam Del: non-english -- https://master.php.net/note/delete/75271/non-english Del: in docs -- https://master.php.net/note/delete/75271/in+docs Del: other reasons-- https://master.php.net/note/delete/75271 Reject -- https://master.php.net/note/reject/75271 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126799) next »