filename in a directory

A

Anonymous

Guest
does anybody knows how can i read the directory contents with a remote addr? I mean read all the files placed at:"http://www.server.com/direc"

thanks
fabrizzio
 
If you want to show all contents of a directory just leve it without index page, then you'll be able to do this -->
http://www.server.com/directory/
and you'll see a list of all contents in that dir.

If you want to scan a directory of yours with php use this:

Code:
if ($dir = @opendir("./mydir_from_this_diectory")) {
  while (($file = readdir($dir)) !== false) {
    echo "$file<br>";
  }  
  closedir($dir);
}

bye!
 
Back
Top