急php頁面載入不完全的有關問題

來源:互聯網
上載者:User
急!!php頁面載入不完全的問題,線上等
RT,同一個頁面多次重新整理,有時候正常,有時候只顯示一半,有時候則完全空白
完全的頁面

一半


本機調試的時候沒有遇到此問題,這是在外網發布的時候發生的。下拉框中的內容是用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 < count($rows); $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 < count($col); $j++)
{
$value = $col[$j];

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

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.