作者LovelyVivi (你的话,说得甜蜜..)
看板PHP
标题[请益] 阵列大小
时间Sat Oct 27 11:53:21 2007
最多可以多大??
下面是我某一段程式码
$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
1F:推 shadowjohn:php.ini 里的mem limit设大点看看? 10/27 12:50
※ 编辑: LovelyVivi 来自: 61.57.146.160 (10/27 13:48)