Hi php'ers

Executing the following code on my Redhat 7.2 box, through Apache i
get the most annoying output:

Code:

function listDirectory($basedir){
  $diary_directory = opendir($basedir);
    while($filename = readdir($diary_directory)) {
      if(strcmp(".", $filename) != 0) {
        if(strcmp("..", $filename) != 0) {
          print("<br>$filename is \"");
          print filetype($filename)."\"";
        }
      }
    }
  closedir($diary_directory);
}
listDirectory(".");
   
Output (sample):
       index.php is ""                  (should be "file")
       Ansatte is ""                    (should be "dir")
       Produkter is ""                  (should be "dir")
       Kontorer is "dir"
       view.php3 is ""                  (should be "file")

       
What could possibly be the error?


Kind regards,
    Morten Winkler



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to