Click here to Skip to main content
Rate this: bad
good
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 at 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
0 OriginalGriff 390
1 Sergey Alexandrovich Kryukov 329
2 BillWoodruff 210
3 Afzaal Ahmad Zeeshan 204
4 CPallini 185
0 OriginalGriff 5,560
1 DamithSL 4,476
2 Maciej Los 3,942
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2014
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