You could try using the readdir function to read a list of files (full docs
available from http://www.php.net/manual/en/function.readdir.php)
Here is an expanded version of the example give on the above link.
html
body
File List
?php
if ($handle = opendir('./)) {
/* This is the correct way to loop over the directory. */
while (false !== ($file = readdir($handle))) {
echo a href='$file'$file/abr;
}
closedir($handle);
}
?
/body
/html
This example assumes that the PHP script and files are in the same directory
and are all publically accessible (i.e. a user could simple type
http://www.example.com/filename)
Hope this helps
Regards
Lee
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 01, 2002 5:57 PM
Subject: [PHP] Php Dynamic Pages Apache Server
I am trying to create a php page that will show the files on an apache
server.
Each file will show up as a link on the page. When clicked, the user will
be
able to download the file. Is there anyone out there that can lead me in
the
right direction.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php