#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    23
    Rep Power
    0
    Hi, anyone know how to use PHP (only, no javascript or whatsoever) to take text from a file in the server?

    Also tell me how do you take text from a particular line which starts with some particular numbers in which PHP will detect and view that line and below until another number appears. Is this possible? If so, how?

    I would appreciate any help.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    38
    Rep Power
    15
    you should probably look into fopen() for open the file and then dump it into an array, line by line
    $foo=fopen("file",r+) or something
    then just find the line in that that begins with the numbers or whatever and volia
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    23
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>fopen() for open the file and then dump it into an array, line by line
    $foo=fopen("file",r+) or something
    [/quote]

    What is the r+ ??
    Is the "file" the path to the file?

    Please reply A.S.A.P.
    Thank you, enygma, for replying.

    ------------------
    C.K.C.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    20
    Rep Power
    0
    Check out http://www.php.net/manual/function.fopen.php

    Good luck!

    ------------------
    ---------
    Lanny
    dtm

Similar Threads

  1. help with tables and wordwrapping
    By junkedBrian613 in forum PHP Development
    Replies: 2
    Last Post: February 15th, 2004, 06:42 PM
  2. Possible to read in value from a text file?
    By discus18 in forum PHP Development
    Replies: 2
    Last Post: February 7th, 2004, 12:19 AM
  3. Simple find and replace word search for a text file with php?
    By rabid lemming in forum PHP Development
    Replies: 4
    Last Post: February 1st, 2004, 10:37 PM
  4. How to read multiple line text file into a variable
    By gatewaycityca in forum Visual Basic Programming
    Replies: 4
    Last Post: January 29th, 2004, 01:26 PM
  5. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 07:19 PM

IMN logo majestic logo threadwatch logo seochat tools logo