Here's an example code I use
<?
// print the current directory in unordered list
print("<UL>\n");
// get each entry within the directory & return to user with the
link
$myDirectory = dir(".");
while($entryName = $myDirectory->read())
{
if ($entryName != "." && $entryName != ".." && $entryName !=
"index.php"){
print("<LI><a href=$entryName>$entryName \n</a>");
}
}
?>
Hope it helps!
-----Original Message-----
From: Steve Werby [mailto:[EMAIL PROTECTED]]
Sent: 28 November 2001 05:39
To: Deependra B. Tandukar; [EMAIL PROTECTED]
Subject: Re: [PHP] Directory Contents Listing
"Deependra B. Tandukar" <[EMAIL PROTECTED]> wrote:
> How do I display the directory contents using PHP?
See readdir() in the online manual. I'm pretty sure it even has example
code you could paste in.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]