Hello,

For my website I use some PHP code for navigation. Therefore I use a
directory structure which contains some navigation files the visitor can
open. The directory structure looks like this:

my_domain
     |
     - /navigation
     |              - file_1.html
     |              - file_2.html
     |              - file_3.html
     |
     -/images
     :
     :

The name of the files the visitor can open (file_1....file_3) I detect from
reading the files in the directory "navigation". The function I use is this:

$handle=opendir("./navigation/");
$counter=0;

while ($file = readdir($handle)) {

 $the_type = strrchr($file, ".");
 $is_html = eregi("htm",$the_type);
 if ($file != "." and $file != ".." and $is_html) {
   $newsflash[$counter] = $file;
   $counter++;

 }
}
closedir($handle);
rsort($newsflash);
reset($newsflash);

With some other code I can echo the different files, this code works on the
same server. Now I want to read the navigation files from a different server
(my_domain2), then I get an error and the name of the files are not shown.
When I try it with Apache on my local computer an error is shown on the
first line
 $handle=opendir("http://domain2/navigation/";);

Is there an other way of getting the filenames from a different server? The
directory structure at my_domain is equal to my_domain2. Apparently the
function opendir is not correct, can someone help me?

Thanks in advance,

André

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to