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

    Join Date
    Apr 2000
    Location
    Hong Kong
    Posts
    71
    Rep Power
    15
    When I open a text file to read, we can use feof() at the END of FILE. But, how to find the END of LINE?

    ------------------
    RayRay p(^_^)q
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    You don't need to. fgets() will read until an eol character (n) is reached.
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    Hong Kong
    Posts
    71
    Rep Power
    15
    I used the fgets() command before, but I need to get the data from a text file to convert into MySQL.
    Now the problem is a blank line in the text file, it will convert to a blank record in MySQL.

    ------------------
    RayRay p(^_^)q

Similar Threads

  1. DB2 SQL Optimazation
    By act7656 in forum DB2 Development
    Replies: 1
    Last Post: June 8th, 2004, 10:49 PM
  2. Uploading Files
    By vivekjain in forum ASP Programming
    Replies: 0
    Last Post: February 16th, 2004, 11:21 PM
  3. Relative Path
    By MrT in forum Apache Development
    Replies: 2
    Last Post: February 12th, 2004, 06:05 AM
  4. How to get Vbscript running
    By linh in forum Visual Basic Programming
    Replies: 1
    Last Post: January 30th, 2004, 12:48 PM
  5. append at end of a line in a file
    By papajohns in forum Perl Programming
    Replies: 10
    Last Post: January 30th, 2004, 12:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo