Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
manipulate a string that is 30 million characters long
manipulate a string that is 30 million characters long ¬†using -'php,memory-management'
I am downloading a CSV file from another server as a data feed from a vendor.
I am using curl to get the contents of the file and saving that into a variable called $contents.
I can get to that part just fine, but I tried exploding by \r and \n to get an array of lines but it fails with an 'out of memory' error.
I echo strlen($contents) and it's about 30.5 million chars.
I need to manipulate the values and insert them into a database. ¬†What do I need to do to avoid memory allocation errors?
Sep 29, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening