note 97514 deleted from function.copy by danbrown

From: Date: Fri, 23 Apr 2010 14:00:32 +0000
Subject: note 97514 deleted from function.copy by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-168564@lists.php.net to get a copy of this message
Note Submitter: francois hill ---- There is mistake in the function smartCopy() here beneath, in the use of the function 'readdir'. From the readdir() manual page : <?php /* This is the correct way to loop over the directory. */ while (false !== ($file = readdir($handle))) { echo "$file\n"; } /* This is the WRONG way to loop over the directory. */ while ($file = readdir($handle)) { echo "$file\n"; ?> I happened to have a file named '0' in one my folders, and, of course it didn't work properly ... Cheers.

« previous php.notes (#168564) next »