NYCPHP Meetup

NYPHP.org

[nycphp-talk] RE CSV file Reading

Aniesh joseph anieshjoseph at gmail.com
Mon Mar 26 10:56:42 EDT 2007


Hello

I tried this method.

When we read large file, CGI timeout will occur. So cannot read large files
of length 10 MB or more. Can someone suggest any other method?

You could always put the csv contents on a multi-dimensional array as
you are reading each line.
When you read the line, you check to see if all the data is complete,
then you check against the array for duplicates, if it passes both
tests, then you enter the new line into the array.

I don't know how efficient this is with a 10MB file, but I'd say it's
worth a try.

Alvaro

Aniesh joseph wrote:
>* Hello
*>*
*>*
*>* I have to read large CSV file upto 10 MB size. I tried to read each
*>* line by using getcsv() method, but cannot worthy. I have to make some
*>* checking the contents of the CSV files such as any duplicate row, or
*>* any row missing contents etc.
*>*
*>* Can anybody suggests a method to read large file of CSV files ?
*>*
*>* Regards
*>* Aniesh Joseph


Regards
Aniesh Joseph
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070326/f6a92f31/attachment.html>


More information about the talk mailing list