循环目录有时会提示超时什么原因

浏览:578 发布日期:2013/03/22 分类:求助交流
public function getcatecurmbs( $id=0){            
                $tree = array();
                $cats = M('Category');
                $cats = $cats->select();    
            
                while( $id>0){
                    foreach( $cats as $v){
                        if( $v['cateid'] == $id){
                            $tree[] = $v;
                            $id = $v['pid'];
                            break;
                        }
                    }
                }
                    return array_reverse( $tree);
                
        }
报错信息:

:(
Maximum execution time of 30 seconds exceeded E:\myhost\apache\htdocs\f\fmj\Lib\Action\IndexAction.class.php 第 464 行.
错误位置
FILE: E:\myhost\apache\htdocs\f\Core\ThinkPHP\Lib\Core\Think.class.php  LINE: 277
TRACE
[13-03-21 21:57:03] E:\myhost\apache\htdocs\f\Core\ThinkPHP\Lib\Core\Think.class.php (277) halt(Maximum execution time of 30 seconds exceeded E:\myhost\apache\htdocs\f\fmj\Lib\Action\IndexAction.class.php 第 464 行.)
[13-03-21 21:57:03] E:\myhost\apache\htdocs\f\Core\ThinkPHP\Lib\Core\Think.class.php (292) Think::appError(1, Maximum execution time of 30 seconds exceeded, E:\myhost\apache\htdocs\f\fmj\Lib\Action\IndexAction.class.php, 464)
[13-03-21 21:57:03] () Think::fatalError()

ThinkPHP3.1.2 { Fast & Simple OOP PHP framework } -- [ WE CAN DO IT JUST THINK ]


最佳答案
评论( 相关
后面还有条评论,点击查看>>