RE: [PHP] Using PHP for directory indexing

From: Date: Mon, 12 Nov 2001 14:09:23 +0000
Subject: RE: [PHP] Using PHP for directory indexing
Groups: php.general 
Request: Send a blank email to php-general+get-74281@lists.php.net to get a copy of this message
Wow that was a quick response...Thanks alot! That those the listing part of my problem but is there a way of only showing a certain type of file such as only HTML? & is there a way of somehow automatically making a link to access those pages?
From: "Oosten, Sjoerd van" <SvOosten@esites.nl> To: 'Kevin Garrett' <kevgar90@hotmail.com>, "'php-general@lists.php.net'" <php-general@lists.php.net> Subject: RE: [PHP] Using PHP for directory indexing Date: Mon, 12 Nov 2001 14:15:14 +0100 <? // print the current directory in unordered list print("<UL>\n"); // open directory $myDirectory = dir("."); // get each entry while($entryName = $myDirectory->read()) { print("<LI>$entryName \n"); } // close directory $myDirectory->close(); print("</UL>\n"); ?> ________________________________________ Sjoerd van Oosten Digitaal vormgever svoosten@esites.nl Datamex E-sites B.V. http://www.esites.nl Minervum 7368 Telefoon: (076) 5 730 730 4817 ZH BREDA Telefax: (076) 5 877 757 _______________________________________ -----Oorspronkelijk bericht----- Van: Kevin Garrett [mailto:kevgar90@hotmail.com] Verzonden: maandag 12 november 2001 14:08 Aan: php-general@lists.php.net Onderwerp: [PHP] Using PHP for directory indexing Hi All, I am wondering if anyone can help me with this. I want people accessing my site to see a list of HTML reports but I don't want to turn on Directory indexing on my Apache webserver, seeing as the directory path is present. What I'm looking to do, is to write a basic php script which will read the files in a certain directory & create links to be presented to the user. Has anyone ever done this before? Can someone give me an example or a headstart on this. Thanks in advance Kev _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

« previous php.general (#74281) next »