fopen()-fgets()
viewtopic.php?t=37400 is one such thread I was referring to.
Memory management.
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
EIther I'm missing something here or you are. The problems, since the first post, has been that the file is too big to fit into memory. The offending line in all examples is:
They way you deal with files that are too big for memory is to read them a line or chunk at a time an process them like that.
To keep it a file, take a look at the PHP manual for the standard file functions -- see fgets() for code examples.
To use a database use can often import the data. MySQL uses the "LOAD DATA INFILE 'file.txt' INTO TABLE file;" syntax. Again check the manual.
Code: Select all
$fcontents = file ('file.txt');To keep it a file, take a look at the PHP manual for the standard file functions -- see fgets() for code examples.
To use a database use can often import the data. MySQL uses the "LOAD DATA INFILE 'file.txt' INTO TABLE file;" syntax. Again check the manual.
(#10850)