Click here to Skip to main content
15,895,192 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My Code:
PHP
<?php
        $filesize;
        $ext;
        $dir = "video/";
        echo '<br>';
// Open a known directory, and proceed to read its contents
        if (is_dir($dir)) {
            if ($dh = opendir($dir)) {
                while (($file = readdir($dh)) !== false) {
                    //echo "filename: $file :<br> filetype: " . filetype($dir . $file) . "\n";
                    
                    $sizeoffile = @filesize("video/".$file);
                    $ext = pathinfo($file, PATHINFO_EXTENSION);
                    stat(iconv('UTF-8', 'ISO-8859-1', $file));
                    
                    echo '<br>'.$sizeoffile ." extention:".$ext;
                }
                closedir($dh);
            }
        }
        echo '<br>';
?>

Out put:
0 extention:
0 extention:
Warning: stat(): stat failed for index.tpl in C:\xampp-portable\htdocs\FileManager\index.php on line 31

1905 extention:tpl
Warning: stat(): stat failed for license.txt in C:\xampp-portable\htdocs\FileManager\index.php on line 31

432 extention:txt
Warning: stat(): stat failed for php.ini in C:\xampp-portable\htdocs\FileManager\index.php on line 31

79095 extention:ini
Warning: stat(): stat failed for rmagick-2.13.1.gem in C:\xampp-portable\htdocs\FileManager\index.php on line 31

1300992 extention:gem
Warning: stat(): stat failed for Wildlife.wmv in C:\xampp-portable\htdocs\FileManager\index.php on line 31

26246026 extention:wmv

I want to stop this warning message How can I do it? please give me a solution...
Posted
Comments
Prasad Khandekar 22-Apr-13 9:59am    
This might be permission issue!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900