Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Lot's of errors

  1. #1
    Jaan Guest

    Lot's of errors

    Umm.. i have this problemo..
    here's my function:

    Code:
    function list_dir($dir){
    if(
    is_dir($dir)){
    if(
    $handle opendir($dir)){
    echo 
    "<form action='' method='post'>";
    echo 
    "<table width='100%' border='0' align='center'>";
    while((
    $file readdir($handle)) !== false){

    $filesize filesize($file);
    $lastchanged date("F d Y - H:i:s",filemtime($file));
    $filetype filetype($file);
    if(
    $filetype == "file"){
    $filetype "File";
    }elseif(
    $filetype == "dir"){
    $filetype "Directory";
    }

    if(
    is_dir($file)){
    $url "?act=show&folder=".$file;
    }elseif(!
    is_dir($file)){
    $url "?act=show&file=".$file;
    }

    if(
    $file != "." && $file != ".." && $file != "Thumbs.db" && is_dir($file)){
    echo 
    "<tr>";
    echo 
    "<td width='25%' bgcolor='#cedee4'><input type='checkbox' name='".$file."'>&nbsp;<a href='".$url."'><font id='base-text' style='color:black'>".$file."</font></a></td>";
    echo 
    "<td width='25%' bgcolor='#cedee4'><font id='base-text' style='color:black'>".filesize_r($file)."&nbsp;bytes</font></td>";
    echo 
    "<td width='25%' bgcolor='#cedee4'><font id='base-text' style='color:black'>".$filetype."</font></td>";
    echo 
    "<td width='25%' bgcolor='#cedee4'><font id='base-text' style='color:black'>".$lastchanged."</font></td>";
    echo 
    "</tr>";
    }
    }

    closedir($handle);
    }
    }

    and here's now i'll display my directories:

    Code:
    $rootdir $_SERVER["APPL_PHYSICAL_PATH"];
    $subdir $_SERVER['PHP_SELF'];
    $subdir explode("/"$subdir);
    $subdir $subdir['0'];
    $folder $_GET['folder'];
    $pathUrl $rootdir."\\".$subdir;
    $pathSplit explode("\\"$pathUrl);
    $pathSize sizeof($pathSplit);
    $pathReal $pathSize-2;
    $path $pathSplit[$pathReal];
    list_dir($rootdir); 
    :/ but i will get these errors..:

    Warning: filesize() [function.filesize]: stat failed for calc.php in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for calc.php in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for calc.php in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for cmd in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for cmd in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for cmd in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for downloadcounter in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for downloadcounter in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for downloadcounter in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for ext-2.0 in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for ext-2.0 in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for ext-2.0 in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for fm in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for fm in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for fm in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for fmp in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for fmp in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for fmp in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for forum in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for forum in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for forum in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for fw in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for fw in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for fw in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for gd in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for gd in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for gd in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for mime.php in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for mime.php in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for mime.php in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for phpadmin in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for phpadmin in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for phpadmin in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for phpbb in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for phpbb in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for phpbb in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for test in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for test in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for test in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45

    Warning: filesize() [function.filesize]: stat failed for tree in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 43

    Warning: filemtime() [function.filemtime]: stat failed for tree in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 44

    Warning: filetype() [function.filetype]: Lstat failed for tree in D:\Program Files\Abyss Web Server\htdocs\fmp\index.php on line 45
    :/ maybe someone can help me and tell me what's wrong

  2. CODECALL Circuit advertisement

     
  3. #2
    phpforfun's Avatar
    phpforfun is offline Speaks fluent binary
    Join Date
    Feb 2008
    Posts
    1,232
    Blog Entries
    17
    Rep Power
    24
    Its giving you an error for each file..?

  4. #3
    Jaan Guest
    yup yup..
    well.. it goes like this

    Main folder
    D:\Program Files\Abyss Web Server\htdocs

    Folder and file where i'm executing my script
    D:\Program Files\Abyss Web Server\htdocs\fmp\index.php

    and i try to get info from
    D:\Program Files\Abyss Web Server\htdocs

    but it don't wanna work.. it's so wierd

  5. #4
    phpforfun's Avatar
    phpforfun is offline Speaks fluent binary
    Join Date
    Feb 2008
    Posts
    1,232
    Blog Entries
    17
    Rep Power
    24
    so you're trying to recall files from "../"

    I dont see that anywhere in your code, did you substitute it with something that I dont get? lol

  6. #5
    Jaan Guest
    i tried it.. it don't work

  7. #6
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20
    stat() is only available on operating systems [not Windows] that support `st_blksize.` Upon failure, stat() throws an E_WARNING - hence your warnings.

  8. #7
    Jaan Guest
    Quote Originally Posted by John View Post
    stat() is only available on operating systems [not Windows] that support `st_blksize.` Upon failure, stat() throws an E_WARNING - hence your warnings.
    Okay... this don't help me much..
    anyone have any ideas how to fix it?

    btw.. these are the lines:

    Code:
    43. $filesize filesize($file);
    44. $lastchanged date("F d Y - H:i:s",filemtime($file));
    45. $filetype filetype($file); 
    Last edited by Jaan; 02-26-2008 at 06:05 AM.

  9. #8
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20
    Have you considered looking in the PHP manual, rather than asking someone to fix it for you?

  10. #9
    Jaan Guest
    problem is that.. i havent used this stat() function

  11. #10
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20
    You don't, but the functions filesize(), filetype(), and filename() do.

Closed Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Firefox is slow and using lot's of CPU
    By Jaan in forum Computer Software/OS
    Replies: 22
    Last Post: 11-07-2010, 03:59 AM
  2. tic tac toe help can't run errors
    By carlitos2012 in forum Java Help
    Replies: 1
    Last Post: 10-17-2010, 06:24 AM
  3. Please Fix The Errors In The Cod
    By muskan in forum PHP Development
    Replies: 7
    Last Post: 06-18-2009, 12:05 AM
  4. HDD errors... help !
    By Turk4n in forum Computer Hardware
    Replies: 29
    Last Post: 08-25-2008, 02:00 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts