<>  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 <> 

        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

        I would like to place a bunch of text files in a directory and have
        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.
        remainder it would title with the first x characters and place it on
        right of the screen (like an archive)

        I know that I can use a function similar to fopen in XBase to access
        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
        Dreamweaver 4 templates.

        Anyone have any suggestions.....
        Thanks in advance...


PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to