I don't know if it's a bug in php but if I do
$fp=fopen("some_file","r"); while (!feof($fp)) { fscanf($fp, "%d %d",&$var1,&$var2); // some treatment } fclose($fp);
and the file is big enough, php eat up memory like hot cakes. But if I do
$fp=fopen("some_file","r"); while (!feof($fp)) { $line = fscanf($fp, "%d %d"); list ($var1, $var2) = $line; // some treatment } fclose($fp);
It work just fine. Seems a problem with fscanf.
Has someone ever experienced this? Any advises?
Oh btw I'm using php 4.3.4 with Apache 1.3.29
Thanks in advance
Sébastien Guay
_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous ! http://fr.ca.search.msn.com/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php