看板 PHP 關於我們 聯絡資訊
最多可以多大?? 下面是我某一段程式碼 $vector1=array(); while(!feof($fp1)) { set_time_limit(0); $pieces1=null; $buffer1= fgets($fp1); array_push($class_train,$buffer1{0}); $buffer1=substr($buffer1,2); $pieces1 = explode(" ",$buffer1); for($j=0;$j<220;$j++) { $pieces1[$j]=str_replace(':',"",strstr($pieces1[$j],':')); } array_push($vector1,$pieces1); } 跑比較小的資料都沒事, 到一個18000筆的資料時就出了問題 想問有解決方法嗎? 還是只能不要存進二維陣列 資料樣子: 1:xxxxxx 2:xxxxx ........... 220:xxxxxx 1:xxxxxx 2:xxxxx ........... 220:xxxxxx 1:xxxxxx 2:xxxxx ........... 220:xxxxxx 大概就以上這樣 然後有18000條 用cygwin跑會出現 Fatal error: allowed memory size of 134217728 bytes exhausted (tried to allocate bytes) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.57.146.160
shadowjohn:php.ini 裡的mem limit設大點看看? 10/27 12:50
※ 編輯: LovelyVivi 來自: 61.57.146.160 (10/27 13:48)