Maximum execution time of 30 seconds exceeded
来源:互联网 发布:sql中给表起别名 编辑:程序博客网 时间:2024/06/04 18:25
错误位置
FILE: C:\xampp\htdocs\passwordSwitch\ThinkPHP\Library\Think\Db\Driver.class.php LINE: 223
public function dataWrite(){ echo "<hr>正在写入...<hr>"; $cto = new CtoModel(); // $data['id'] = '3'; $data['username'] = '空空dream'; for ($i=530;$i<55530;$i++){ $email = 'lglgl'.$i.'@163.com'; $data['email'] = $email; $data['password'] = '10086'; $cto->data($data)->add(); echo "<hr>".$email."写入完成<hr>"; }
xamp环境,此错误字面上理解是“最大执行时间超过30秒”;
故障出处:一次性往数据库写入5W条数据产生的错误.
由于Apache PHP默认设置的 max_execution_time 为30秒,而一次性往数据库写入5W条数据的时间超出了30秒,故产生次错误.
解决办法:在PHP.INI中找到max_execution_time参数,设置为您认为的最大数值即可.
参考:http://blog.sina.com.cn/s/blog_70b166010100uk73.html
0 0
- Maximum execution time of 30 seconds exceeded
- Maximum execution time of 30 seconds exceeded
- Maximum execution time of 30 seconds exceeded
- Maximum execution time of 30 seconds exceeded
- Maximum execution time of 30 seconds exceeded
- Maximum execution time of 30 seconds exceeded
- Fatal error: Maximum execution time of 30 seconds exceeded in
- Maximum execution time of 30 seconds exceeded故障解决办法
- Fatal error: Maximum execution time of 30 seconds exceeded in
- Maximum execution time of 30 seconds exceeded故障解决办法
- Maximum execution time of 30 seconds exceeded 错误解决方法
- 浅析Maximum execution time of 30 seconds exceeded
- Fatal error: Maximum execution time of 30 seconds exceeded in
- mihoweb Maximum execution time of 30 seconds exceeded解决办法
- 报错:Maximum execution time of 30 seconds exceeded解决方法
- Maximum execution time of 30 seconds exceeded解决办法
- [PHP]Maximum execution time of 30 seconds exceeded
- Fatal error: Maximum execution time of 30 seconds exceeded in
- mac 安装jboss
- Topcoder SRM688 Div2 1000 ParenthesesDiv2Hard
- Socket详解
- 自定义的弹出菜单
- CentOS升级Python2.6到Python2.7并安装pip
- Maximum execution time of 30 seconds exceeded
- ASP+JS三级联动下拉菜单
- LeetCode 72. Edit Distance
- asp 用 PagedDataSource 为 datalist 添加分页需注意
- JDK的命令详解操作
- Android 自定义View之随手指滑动的ToggleButton
- 个人收藏
- OCI
- sublime_中使用正则表达式查找替换