Ask a Question related to PHP Development, Design and Development.
-
Gary Petersen #1
Re: [PHP] navigation question
On Mon, 15 Sep 2003 08:41:31 -0500, Andre created an award-winning crop
circle <20030915134110.25572.qmail@pb1.pair.com>, which, when translated
into English, means this:
One option would be to create a php script that acts> [...]
> I suppose the function opendir() only work for a directory at the same
> server. When someone can tell me what I can do best. Because I just
> started with PHP and I read this code in an example, I realy need some
> help if you tell me to use ftp.
>
> Andre
>
as a very limited proxy for the opendir() function, e.g.:
my_domain2.com/navigation/opendir.php:
<?php
error_reporting(E_ALL);
header('Content-Type: text/plain');
$dir = opendir('.');
if ($dir) {
while ($ent = readdir($dir)) {
if (ereg('\.html$', $ent)) {
echo $ent . "\n";
}
}
closedir($dir);
}
?>
The above script outputs a list of HTML files
--one on each line.
Let your other script on your local server
contact the opendir.php script:
$fid = fopen('http://my_domain2.com/navigation/opendir.php', 'r')
or die ( ...
Then it's just a matter of reading from the file
and parsing the lines (easy with explode()).
BTW, keep the proxy script limited; you don't
want people to be able to examine any directory on your
server, do you?
> [ rest snipped ]Gary Petersen Guest
-
CSS IE problem and navigation bar question
Hi I have 2 questions: Is there a way to make all elements of an horizontal navigation bar the same size no matter the size of the word? i... -
Web Navigation Bar and URL Question
New to web programming. I have some very basic questions regarding menu bars. What's the best way to implement menu bar navigation? I looked at... -
Question re Recordset Navigation
Does anyone know whether there is a Recordset Navigation extention that allows you to display all of the pages or records at once with a "view all... -
Navigation Question
Hello, For my website I use some PHP code for navigation. Therefore I use a directory structure which contains some navigation files the visitor... -
Navigation Bar Question
Hello The site isn't posted yet but here is the javascript: <script language="JavaScript" type="text/JavaScript"> <!-- function...



Reply With Quote

