Hi All,
I'm using get_file_contents() to extract arrays fron a text file and populate a database with them It works fine on quite large files, but when they get very large (like 145mb) it simply doesn't work. Does anyone know if there's a limit to .txt file sizes?? or even to the size of arrays from lines (there are about 100000!)
Here's the code:
$exportfile = file_get_contents("sql_output.txt");
$lines = explode("\n",$exportfile);
// This removes any empty entries from the lines array:
foreach($lines as $key => $value)
{
if($value == "") {
unset($lines[$key]);
}
}
$lines = array_values($lines);
Any thoughts anyone?
Many Thanks
Silas