note 15321 added to function.clearstatcache

From: Date: Wed, 05 Sep 2001 13:46:51 +0000
Subject: note 15321 added to function.clearstatcache
Groups: php.notes 
Request: Send a blank email to php-notes+get-17648@lists.php.net to get a copy of this message
How come this only shows the first filesize of the directory lising and then shows nothing for the rest of the entries in the while loop? Hope someone can help! <?php if ($dir = @opendir("/path/to/directory")) { while($file = readdir($dir)) { $size = filesize (readdir($dir)); echo "$file - (size = $size bytes)<br>"; clearstatcache (); } closedir($dir); } ?> http://www.php.net/manual/en/function.clearstatcache.php

« previous php.notes (#17648) next »