Read from files & display selected lines under the file name while indexing
| From: | Kevin Garrett | Date: | Wed, 28 Nov 2001 11:52:20 +0000 |
| Subject: | Read from files & display selected lines under the file name while indexing | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-75881@lists.php.net to get a copy of this message | ||
Hi all.
I have a script that indexes html files within a directory. The files are created using the date & time stamps by another script & what I'm looking to do is somehow create a preview panel for the message which would read the 2nd to the 4th line & disply it under the filename so as to provide a better description. I'd really appreciate somebodies help with this & if you need more information please let me know
My index script looks like the following:
<?
print("<UL>\n");
$thisdir = dir(".");
while($filename = $myDirectory->read())
{
if ($filename != "." && $filename != ".." && eregi (".*\.htm",$filename)){
print("<LI><a href=$filename>$filename \n</a>");
}
}
$thisdir->close();
print("</UL>\n");
?>
Thanks
Kev
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp