http://www.php.net/manual/en/ref.filesystem.php
<http://www.php.net/manual/en/ref.filesystem.php> everything you need is
here, in particular fgets.
What you'll need is something like ...
If ($fhandle = fopen("filename", "r"))
{ while ($fline = fgets($fhandle) && ++$count < $X)
{ echo($fline);
}
}
this is untested but should work
Tim
www.chessish.com <http://www.chessish.com>
----------
From: RRNews [SMTP:[EMAIL PROTECTED]]
Sent: 03 January 2002 03:20
To: [EMAIL PROTECTED]
Subject: File opening, writting and location
I'm a newbie to PHP and the web.
I've been programming in VB for about 3 years and XBase for about
15.
I would like to place a bunch of text files in a directory and have
a PHP
script pick them up and place the top X lines in a center section of
a page
followed by a MORE link. It would do this for Y number of articles.
The
remainder it would title with the first x characters and place it on
the
right of the screen (like an archive)
I know that I can use a function similar to fopen in XBase to access
the
text files and extract the lines.
In Xbase, I would traverse the directory, extract the lines, place
the X
characters in a string followed by a "More".
If anyone can steer me in the right direction, I would appreciate
it. I
don't get how you place things on the page in a given area. I'm
using
Dreamweaver 4 templates.
Anyone have any suggestions.....
Thanks in advance...
Jerry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]