navigation question

From: Date: Mon, 15 Sep 2003 06:38:12 +0000
Subject: navigation question
Groups: php.general 
Request: Send a blank email to php-general+get-162609@lists.php.net to get a copy of this message
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é

« previous php.general (#162609) next »