PDA

View Full Version : B&T Custom Download Page


Kermit911
9-13-04, 08:30 AM
Morning all,

I took a look @ B&T's Custom Download page, and I'm not sure I fully understand. All I have to do is create a .php file containing:

<?php
$type = array(".jpg",".gif",".txt");
if ($dir = @opendir("./")) {
while (($file_select = readdir($dir)) !== false) {
$type_test = strstr($file_select, '.');
$type_test = strtolower($type_test);
if (in_array($type_test, $type)) echo "<a href='$file_select'>$file_select</a><br>";
}
closedir($dir);
}
?>

Then creat a link to the .php and it should work? I'm sure I'm missing something, just not sure what. Could u help me out a little bit? Thanx a lot guys.

Ps: I use your uploadscript. Works GREAT. I Love it

Thanx
Dave

B&T
9-13-04, 08:35 AM
You take that script and execute it. Either directly, or from another link. It reads the directory and shows a link list for only the files of the specified file type.

Note the list is very plain, you need to dress up the page the way you want it. It is a starter script - as are most of the scripts on that page.

Kermit911
9-13-04, 09:22 AM
:D Thanx B&T That worked Thanx again