Home »

filesize() stat failed for specific path in php?

Question ListCategory: PHPfilesize() stat failed for specific path in php?
alisataylore190 author asked 10 years ago
1 Answers
adamemliy16 author answered 9 years ago
<?php
$path = "./documents";
$dirc = dir($path);
while( ($file=$dirc->read()) ) 
{
    if( $file=="." || $file=="..")continue;
    
    $realfile = $path . "/" . $file;
    echo (is_file($file))? "<img src='file.jpg'/> ";
    echo "<br>".filesize($file);
}
?>

Please login or Register to Submit Answer