CDbException

数据库中无法找到 active record class "AdTextlink" 对应的 table "ad_textlink".

/work/ssp.21ic.com/framework/db/ar/CActiveRecord.php(2310)

2298     private $_model;
2299 
2300     /**
2301      * Constructor.
2302      * @param CActiveRecord $model the model instance
2303      */
2304     public function __construct($model)
2305     {
2306         $this->_model=$model;
2307 
2308         $tableName=$model->tableName();
2309         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2310             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2311                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2312         if($table->primaryKey===null)
2313         {
2314             $table->primaryKey=$model->primaryKey();
2315             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2316                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2317             elseif(is_array($table->primaryKey))
2318             {
2319                 foreach($table->primaryKey as $name)
2320                 {
2321                     if(isset($table->columns[$name]))
2322                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#1
+
 /work/ssp.21ic.com/protected/models/AdTextlink.php(121): CActiveRecord::model("AdTextlink")
116      * @param string $className active record class name.
117      * @return AdTextlink the static model class
118      */
119     public static function model($className=__CLASS__)
120     {
121         return parent::model($className);
122     }
123     public function getlist($data){
124         $criteria = new CDbCriteria();
125         if($data['subject']){
126             if(strlen($data['subject'])==8){
#2
+
 /work/ssp.21ic.com/protected/controllers/AdtextlinkController.php(191): AdTextlink::model()
186      * 前台链接转跳
187      */
188     public function actionR(){
189         $code = Yii::app()->request->getParam('c');
190         $l    = Yii::app()->request->getParam('l');
191         $model = AdTextlink::model()->find("code=:code and flag=1 and endtime>:endtime",array(':code'=>$code,':endtime'=>date('Y-m-d')));
192         $iscrawler = self::isCrawler();
193         
194         //美光主站首页链接点击数量过大2022.06.13
195         if(in_array($code,['aozmeosa','l0h79baa','7r44iy1w','a19cni54','u923v05q','xoetmshv','gharim6g','fioo723q']) && empty($_SERVER['HTTP_REFERER'])){
196             throw new CHttpException('404','You are not allowed to acces this page');
#15
+
 /work/ssp.21ic.com/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',0);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-29 01:45:49 nginx/1.12.2 Yii Framework/1.1.13