PHP notice

Undefined variable: cid

E:\www\utpure\protected\views\product\newlist.php(90)

078                             <li class="<?=$act?>"><a href="/<?=$_n -> url?>" title="<?=$_n -> title?>"><?=$_n -> title?></a><span class="rrig"><img src="/static/qt/img/rrig.png" alt=""></span></li>
079                         <?php
080                         endforeach;
081                     endif;?>
082                 </ul>
083             </div>
084             <?= $this->renderPartial('/layouts/left_menu')?>
085             <div class="news_d_r fl">
086                 <div class="n_d_r_t"><div class="xgnr">相关内容</div><div class="xgnr_eng">Recommend</div></div>
087                 <div class="n_d_r_line"></div>
088                 <div class="n_d_r_list">
089                     <ul>
090                         <?php $latest = Common::getArticle2($cid);
091                         if(!empty($latest)):
092                             foreach ($latest as $l => $_l):
093                                 ?>
094 
095                                 <li>
096                                     <?php if(!empty($all)):?>
097                                     <a href="<?=$this->createUrl('product/news', array('id'=>$_l -> id,'list' => $all));?>" title="<?= $_l -> title; ?>">
098                                         <?php else: ?>
099                                         <a href="<?=$this->createUrl('product/news', array('id'=>$_l -> id));?>" title="<?=$_l -> title; ?>">
100                                             <?php endif; ?>
101                                             <div class="title_left_tu"  style="text-align: center">
102                                                 <img src="<?=$_l->imgs?>"  alt="" title="<?=$_l -> title; ?>"  width="93"/>

Stack Trace

#4
+
 E:\www\utpure\protected\controllers\ProductController.php(117): CController->render("newlist", array("model" => array(Product, Product, Product, Product, ...), "pages" => CPagination))
112 
113 
114         $this -> render('newlist',array(
115             'model' => $model['model'],
116             'pages' => $model['pages'],
117         ));
118     }
119 
120     public function actionNews($id){
121        $model = Product::model()->findByPk($id);
122         $this -> setPageTitle($model->seo_title);
#12
+
 E:\www\utpure\index.php(94): CApplication->run()
89 // constant varchar import
90 require_once (dirname(__FILE__)).'/protected/config/constant.php';
91 
92 
93 require_once($yii);
94 Yii::createWebApplication($config)->run();
95 
96 
2024-03-29 22:40:32 Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 Yii Framework/1.1.17