How would I list every thing in a folder for a web site ?

So

Lifer
Jul 2, 2001
25,921
14
81
google it....or write it yourself...i believe you could even use recursion to get subdirs, PHP may have a funstion to output what you need. Look at the PHP homepage. :)
 

mugs

Lifer
Apr 29, 2003
48,924
45
91
Don't put an index.* file in the folder, and your webserver will do it for you (if you have that option turned on... I did before I started working on a site once and someone told me that's dangerous... not sure why) :)
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Originally posted by: mugs
Don't put an index.* file in the folder, and your webserver will do it for you (if you have that option turned on... I did before I started working on a site once and someone told me that's dangers... not sure why) :)

Can't with 1&1.
 

nodoubts2k

Golden Member
Sep 7, 2003
1,531
1
71
U cant do it with 1&1 through the htaccess. What i did is use a php script that does it, and made it an index page in every directory.

<?php
$imgDir = opendir("/homepages/32/blahblah/htdocs/files/");
echo " <center><strong>Contents of the directory
</center></strong>";
while($imgName = readdir($imgDir))
{
if ((($imgName != ".") || ($imgName != "..")) && (strcmp(substr($imgName, -4), ".php"))) //Displays all pages but php
print("<A HREF=\"$imgName\">$imgName</A>
\n");
}
?>
 

SunnyD

Belgian Waffler
Jan 2, 2001
32,674
145
106
www.neftastic.com
Originally posted by: Jzero
Other than the crappy control panel, what's so bad about 1and1?

1 database, with a crappy naming convention.

Slow control panel.

Dated PHP (4.2.3).

The main redeeming quality was 3 free years of 5GB/mo bandwidth.
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
:beer: for everyone, thank you. Does any one know if I can put that script in a table ?


edit: you can, thank you all :beer: :heart: