欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

急php页面加载不完全的有关问题

程序员文章站 2024-01-14 13:23:10
...
急!!php页面加载不完全的问题,在线等
RT,同一个页面多次刷新,有时候正常,有时候只显示一半,有时候则完全空白
完全的页面
急php页面加载不完全的有关问题
一半
急php页面加载不完全的有关问题

本机调试的时候没有遇到此问题,这是在外网发布的时候发生的。下拉框中的内容是用fopen打开了一个.tab文件然后读取出来的,然后通过循环转成数组,又通过循环给js数组赋值,循环为1000。
设置了set_time_limit(60*60*10)依然无效。。。
跪求指导,谢谢。。。附上部分代码

common.php
public static function readTabFile($fileName)
{
if (!file_exists($fileName))
{
die("404 File not found!");
}
$handle = fopen($fileName, 'rb');
$contents = fread($handle, filesize ($fileName));

//iconv("UTF-8","GBK", $contents);

if(ord($contents) == 0xEF)
{
$contents = substr($contents, 4);
}
$rows = explode("\r\n", $contents);
fclose($handle);
$ret;
$colNames = null;
for($i = 0; $i {
$row = $rows[$i];
if(!empty($row) && $row != "" && substr($row, 0, 1) != "#")
{
$col = explode("\t", $row);
if(empty($colNames) || $colNames == null)
$colNames = $col;
else
{
$item;
$itemId = (int)$col[0];
if(empty($itemId))
{
die("...");
}
for($j = 0; $j {
$value = $col[$j];

$item[$colNames[$j]] = $value;
}
$ret[$itemId] = $item;
}
}
}
return $ret;

}
?>
test.php
$dir = "../goods.tab";
$table = Common::readTabFile($dir);
?>