What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP File Indexer

PHP File Indexer
Author: Message:
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. PHP File Indexer
How could I take this code and output the result to a txt file on the server?

code:
<?php
$maindir = "." ;
$mydir = opendir($maindir) ;
$exclude = array( "index.php") ;
while($fn = readdir($mydir)) { if ($fn == $exclude[0] || $fn == $exclude[1]) continue;
echo "<br><a href='$fn'>$fn</a>"; } closedir($mydir);
?>


What it does is it lists all the files in that folder that the indexer.php is in.
So how would I take that list and put it in a txt file?

If any one knows of a simpler or better way of outputting all the file names and the links to them in a txt file on the server please feel free to post it.

This post was edited on 03-01-2005 at 12:43 AM by DJeX.
[Image: top.gif]
03-01-2005 12:42 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP File Indexer - by DJeX on 03-01-2005 at 12:42 AM
RE: PHP File Indexer - by L. Coyote on 03-01-2005 at 12:45 AM
RE: PHP File Indexer - by TheBlasphemer on 03-01-2005 at 12:55 AM
RE: PHP File Indexer - by DJeX on 03-01-2005 at 01:04 AM
RE: PHP File Indexer - by TheBlasphemer on 03-01-2005 at 01:07 AM
RE: PHP File Indexer - by DJeX on 03-01-2005 at 01:08 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On