Possible Duplicate:
Import CSV file directly into MySQL
I have tried to read data from csv files or comma separated files of huge file size (more than 250MB) in php with different methods (one of these is as under), so i can insert required data from it to mysql database but the program crashes every time before the completion of reading of file. I also tried to increase the memory limit in php.ini. The following errors are faced:-
1.----------------------------------------------
memory_limit = 128M Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 63 bytes) in C:\wamp\www\site\files\plugin\agoda\agoda.plugin.php on line 19
2.----------------------------------------------
memory_limit = 1000M Fatal error: Allowed memory size of 1048576000 bytes exhausted (tried to allocate 1299 bytes) in C:\wamp\www\site\files\plugin\agoda\agoda.plugin.php on line 19
3.----------------------------------------------
memory_limit = 2000M
Null
I need a way to read such files in php without crashing my program.