Click here to Skip to main content
12,075,066 members (67,517 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Javascript PHP MySQL
My Code:
<?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 22-Apr-13 4:47am
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web03 | 2.8.160208.1 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100