On 8/9/2012 5:01 PM, Al wrote:
Getting "Too many open files" error when processing an email batch process. I've looked extensively and can't find more than about 100 files that could be open. All my fetching is with get_file_contents();
Why not use fopen() and other related functions to open/grap/close your batch of files?
You could replace a call like this: $data = file_get_contents($filename); with this: if ( $fh = fopen($filename, 'r') ) { $data = fread($fh, filesize($filename)); fclose($fh); } This should take care of your issue. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php