Directory Listing

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Arctic
-


Joined: 24 Sep 2004
Posts: 560

PostPosted: Wed Apr 20, 2005 2:13 pm    Post subject: Directory Listing Reply with quote

Is there a PHP script that genetates a list of the files in the directory? It would be nice if you could help :O
Back to top View user's profile Send private message ICQ Number
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Wed Apr 20, 2005 2:27 pm    Post subject: Reply with quote

http://www.abyssunderground.co.uk/forum/viewtopic.php?t=16
_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
Arctic
-


Joined: 24 Sep 2004
Posts: 560

PostPosted: Wed Apr 20, 2005 4:40 pm    Post subject: Reply with quote

Does it work if I just stick it in a directory? Can I take away the images? I need a very simple script, no images, just lists all the files in the directory using names and links.
Back to top View user's profile Send private message ICQ Number
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Wed Apr 20, 2005 5:53 pm    Post subject: Reply with quote

Im sure you could just edit the code a bit to get rid of the images. If you go to the scripts page on www.abyssunderground.co.uk there is a script there for directory listings which i wrote.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Wed Apr 20, 2005 8:43 pm    Post subject: Reply with quote

Yes , you can remove the images if you don't want images but I think the script
only works when using the Directory Listing feature in Abyss Web Server , im not
sure but I think I tried it once and you had to use with the Directory Listing.

Here's a PHP script that can do what your asking for.

Code:

<pre>
<?php
$dir = ".";
$open = opendir($dir);
while ($file = readdir($open)) {
  if (is_file($file)) {
 echo "<a href=\"$file\">$file</a>\n";
}
}
closedir($open);
?>
</pre>
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group