Exception 获取页面信息出错 /var/www/html/huaxiang/protected/controllers/PageController.php(51) 39 if(!empty($post_name)) { 40 $post_array = array('product','about', 'news' ,'investor', 'hr', 'contact'); 41 if(in_array($post_name,$post_array)) { 42 $page_view = $post_name; 43 } 44 } 45 46 $param['post_name'] = $post_name; 47 48 $WpPosts = WpPosts::model()->findByAttributes(array('post_name'=>$param['post_name'],'post_type'=>'page')); 49 50 if(empty($WpPosts)) { 51 throw new Exception('获取页面信息出错'); 52 } 53 54 $sub_page = array(); 55 $default_sub_category = array(); 56 57 switch ($WpPosts->post_title) { 58 case '关于华翔': 59 $sub_page = WpPosts::model()->findByAttributes(array('post_parent'=>$WpPosts->ID,'post_title'=>'企业概况')); 60 break; 61 case '华翔动态': 62 $default_sub_category = WpTerms::model()->findByAttributes(array('name'=>'公司新闻')); 63 break; Stack Trace #0 + /var/www/html/framework/web/actions/CInlineAction.php(49): PageController->actionIndex() #1 + /var/www/html/framework/web/CController.php(308): CInlineAction->runWithParams(array("post_name" => "chinese")) #2 + /var/www/html/framework/web/CController.php(286): CController->runAction(CInlineAction) #3 + /var/www/html/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array()) #4 + /var/www/html/framework/web/CWebApplication.php(282): CController->run("index") #5 + /var/www/html/framework/web/CWebApplication.php(141): CWebApplication->runController("page/index/post_name/chinese") #6 + /var/www/html/framework/base/CApplication.php(169): CWebApplication->processRequest() #7 – /var/www/html/huaxiang/index.php(13): CApplication->run() 08 defined('YII_DEBUG') or define('YII_DEBUG',true); 09 // specify how many levels of call stack should be shown in each log message 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 11 12 require_once($yii); 13 Yii::createWebApplication($config)->run(); 2016-03-04 05:14:25 Apache/2.2.15 (CentOS) Yii Framework/1.1.13