Need quick php code

minendo

Elite Member
Aug 31, 2001
35,560
22
81
I've got a bunch of sound clips I'd like to share with AT, but need a php script in order to do so. What I need is a script that will show the entire file name of all files in the directory and make them active links.

It's for your own good. :p
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
try this:

<html>
<head></head>
<body>
<?
$handle = opendir('.');

while(($file = readdir($handle)) != false)
{
if(!is_dir($file))
echo "<a href=\"$file\">$file</a><br>\n";
}


?>
</body>
</html>
 

keeleysam

Diamond Member
Feb 8, 2005
8,131
0
0
Originally posted by: chiwawa626
Originally posted by: keeleysam
http://2600hq.com/list.phps

Download and copy to your server rename toy list.php.

Demo at:
http://2600hq.com/list.php

ehm, that code looks very familiar, in fact i've seen the same code minus a few images written by CeleronDude... Hmm... you should give the original author some credit.

Oops... lol ive had that for so long that i must have taken it out when editing it. lemme give him the credit!