hellonoko Posted April 16, 2007 Share Posted April 16, 2007 Using the below code: <?php $dictionary = fopen('US.dic','r'); while (!feof($dictionary)) { $lines[] = fgets($dictionary, 24004096); } fclose($dictionary); ?> I receive this error: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 24004097 bytes) in C:\www\dic\d.php on line 8 The file is 1,185K I am using WAMP for server. Do I need to change some settings or is there a better way to load large files. Thanks Link to comment https://forums.phpfreaks.com/topic/47277-allowed-memory-error-when-loading-large-file/ Share on other sites More sharing options...
boo_lolly Posted April 16, 2007 Share Posted April 16, 2007 it's either your server, or your php.ini file. or both. Link to comment https://forums.phpfreaks.com/topic/47277-allowed-memory-error-when-loading-large-file/#findComment-230617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.