我想通过codeigniter上传excel文件到数据库中。该项目已经使用小尺寸的excel文件运行。但是,如果我上传一个小而大的excel文件,它就不能运行。
问题是最大的执行时间。以下是错误消息:
Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\bisabisa\system\database\drivers\mysqli\mysqli_driver.php on line 221
A PHP Error was encountered
Severity: Error
Message: Maximum execution time of 30 seconds exceeded
Filename: mysqli/mysqli_driver.php
Line Number: 221
Backtrace:当我打开mysqli_driver.php第221行时,代码如下:
protected function _execute($sql)
{
return $this->conn_id->query($this->_prep_query($sql));
}它没有命名为执行时间的代码或与之相关的词。
那么,我需要更改哪些文件呢?
我使用xampp和phpmyadmin。如果我从phpmyadmin上传文件,它可以运行。
发布于 2015-07-09 11:15:00
执行以下更改以解决您的问题:
在system/core/CodeIgniter.php中的第103行
if (function_exists("set_time_limit") == TRUE AND @ini_get("safe_mode") == 0)
{
@set_time_limit(300);
}我试着改变这个值,它起作用了。
https://stackoverflow.com/questions/31306346
复制相似问题