我正在尝试在我的数据库中上传 10k+ 数据(使用 PHP 和 Mysql)。但是文件似乎太大了。如果我将文件的大小减少到大约 9300 条记录,它工作得很好,但在此之上,我的代码似乎在下一行失败了,$excelReader = PHPExcel_IOFactory::createReaderForFile($tmpfname);
我只包含了我的代码片段(我认为与这个问题有关)。我也有upload_max_filesize=124M
和post_max_size=124
。可能是什么问题呢?
<?php
$tmpfname = $_FILES['file_save']['tmp_name'];
echo "0";
$excelReader = PHPExcel_IOFactory::createReaderForFile($tmpfname);
echo "1";
$excelObj = $excelReader->load($tmpfname);
echo "2";
$worksheet = $excelObj->getSheet(0);
echo "3";
$lastRow = $worksheet->getHighestRow();
?>