the file should be in he same folder as that of the php script,
otherwise you have to mention the absolute/relative path

Geethanandh

On Wed, 23 Jun 2004 15:06:52 -0500, Jay Blanchard
<[EMAIL PROTECTED]> 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
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to