ID:               38262
 Updated by:       [EMAIL PROTECTED]
 Reported By:      vppnoel at yahoo dot fr
-Status:           Open
+Status:           Bogus
 Bug Type:         *Directory/Filesystem functions
 Operating System: win32
 PHP Version:      5.1.4
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php




Previous Comments:
------------------------------------------------------------------------

[2006-07-30 16:12:18] vppnoel at yahoo dot fr

Description:
------------
When you use "/." as parameter for scandir function, you list the
content of your drive's root in place of you server's root.

Reproduce code:
---------------
<?php

//List directories only
function list_dirs($path)
{
   $list = scandir($path);
   
   foreach ($list as $number => $filename)
   {
       if ( $filename !== '.' && $filename !== '..' &&
is_dir("$path/$filename") )
       {
           // Asign more readable and logic variables
           $dir = $filename;
           $url = apache_request_headers();
           

           {
               // Print Dirs with link
               print ("<a
href=\"http://$url[Host]/$path/$dir\";>/$path/$dir</a> <br>\n");
               $newpath=$path . "/" . $dir;
               list_dirs($newpath);
           }

               
       }
   }
}
   

list_dirs('/.')

?>

Expected result:
----------------
i would like to see the directories contained in the root of the
server.

Actual result:
--------------
I see the directories contained in the root of the drive


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38262&edit=1

Reply via email to