PHP warning

include(NewsType.php): failed to open stream: No such file or directory

/www/wwwroot/yii/framework/YiiBase.php(421)

409                         {
410                             include($classFile);
411                             if(YII_DEBUG && basename(realpath($classFile))!==$className.'.php')
412                                 throw new CException(Yii::t('yii','Class name "{class}" does not match class file "{file}".', array(
413                                     '{class}'=>$className,
414                                     '{file}'=>$classFile,
415                                 )));
416                             break;
417                         }
418                     }
419                 }
420                 else
421                     include($className.'.php');
422             }
423             else  // class name with namespace in PHP 5.3
424             {
425                 $namespace=str_replace('\\','.',ltrim($className,'\\'));
426                 if(($path=self::getPathOfAlias($namespace))!==false)
427                     include($path.'.php');
428                 else
429                     return false;
430             }
431             return class_exists($className,false) || interface_exists($className,false);
432         }
433         return true;

Stack Trace

#2
+
 /www/wwwroot/erc.szicpa.org/protected/controllers/NewsController.php(10): spl_autoload_call("NewsType")
05  * 新闻页面控制器
06  */
07 class NewsController extends Controller{
08     function actionList(){
09         $newsModel = News::model();
10         $typeModel = NewsType::model();
11         $typeList  = $typeModel->findAll();
12         $count     = 0;
13         $per       = 10;
14         $type      = 0;
15         $sql       = "select Id,photo,addtime,title,type,info from news";
#10
+
 /www/wwwroot/erc.szicpa.org/index.php(16): CApplication->run()
11 //defined('YII_ENABLE_ERROR_HANDLER') or define('YII_ENABLE_ERROR_HANDLER', false);
12 //defined('YII_ENABLE_EXCEPTION_HANDLER') or define('YII_ENABLE_EXCEPTION_HANDLER', false);
13 require_once (dirname(__FILE__).'/protected/config/constant.php');
14 require_once (dirname(__FILE__) . '/vendor/autoload.php');
15 require_once($yii);
16 Yii::createWebApplication($config)->run();
2024-03-29 14:19:35 nginx/1.17.9 Yii Framework/1.1.13