CHttpException

The requested page does not exist.

E:\www\iclear-news\protected\controllers\CaseController.php(106)

094             'type' => trim($name),
095 
096         ));
097     }
098 
099 
100     public function actionView($id)
101     {
102         $this -> ids = '12';
103         $model = Cases::model() -> findByPk($id);
104         //游览量
105         if($model===null){
106             throw new CHttpException(404,'The requested page does not exist.');
107              }
108         $click = $model->click + 1;
109         Cases::model()->updateAll(array('click' => $click),"id = ".$id);
110 
111         //未到日期的文章及其未审核的不显示
112         if($model -> time > time() || $model -> status != 1)
113             $this -> redirect(array('index'));
114 
115         //上一篇
116         $prev = array();
117         $prev=Cases::model()->findAll(array('condition' => 'id<'.$model->id.' and status=1 and time<='.time().' and type="'.$model->type.'"','limit'=>1,'order'=>'time desc'));
118         if(!empty($prev))

Stack Trace

#9
+
 E:\www\iclear-news\index.php(37): CApplication->run()
32 
33 //引入常量设置
34 require_once(dirname(__FILE__).'/protected/config/constant.php');
35 
36 require_once($yii);
37 Yii::createWebApplication($config)->run();
2024-03-28 21:17:49 Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 Yii Framework/1.1.17