Re: Filesize

From: Date: Wed, 23 Jun 2004 20:30:59 +0000
Subject: Re: Filesize
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-188904@lists.php.net to get a copy of this message
while(($theFile = readdir($theDir)) !== FALSE){ != not !== On Wed, 23 Jun 2004 15:06:52 -0500, Jay Blanchard <jay.blanchard@niicommunications.com> wrote: > > Boy you'd think that this would be simple, but I get no filesize with > the following > > for($i = 4; $i < count($arrDirectory); $i++){ > if(is_dir($arrDirectory[$i])){ > if($theDir = opendir($arrDirectory[$i])){ > while(($theFile = readdir($theDir)) !== FALSE){ > $theSize = filesize($theFile); > echo $theFile . "\t" . $theSize . "\n"; > } > } > fclose($theDir); > } > } > > Heck, I even get some warnings... > > PHP Warning: filesize(): Stat failed for cw.tol.1040606180942.txt.gz > (errno=2 - No such file or directory) in > /usr/local/www/data.default/test/dvdArchivePackager.php on line 50 > PHP Warning: filesize(): Stat failed for cw.tol.1040607181154.txt.gz > (errno=2 - No such file or directory) in > /usr/local/www/data.default/test/dvdArchivePackager.php on line 50 > cw.acc.1040605182621.txt.gz > cw.acc.1040606182502.txt.gz > cw.acc.1040607182719.txt.gz > cw.tol.1040519181155.txt.gz > > Have I gone loopy? Wait, don't answer that. Do I need to do something > else to get the file size? I have read and searched, but to no avail > yet. TIA! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#188904) next »