thinkphp3.1.2中明明class存在,但是错误提示class not found
Class'CategoryModel'notfoundE:\Apache24\htdocs\fly\Admin\Lib\Action\CategoryAction.cl...
Class 'CategoryModel' not found E:\Apache24\htdocs\fly\Admin\Lib\Action\CategoryAction.class.php 第 9 行.
model代码
class CategoryModel extends RelationModel{
/*
* 定义关联关系
*/
public $_link = array(
action代码
class CategoryAction extends Action{
function index(){
/* $cat = new CategoryViewModel();
$list=$cat->select();
dump($list); */
//$this->display();
$cat = new CategoryModel();//运行这个出错====求大神解决1
$list=$cat->relation(true)->find(1);
dump($list);
} 展开
model代码
class CategoryModel extends RelationModel{
/*
* 定义关联关系
*/
public $_link = array(
action代码
class CategoryAction extends Action{
function index(){
/* $cat = new CategoryViewModel();
$list=$cat->select();
dump($list); */
//$this->display();
$cat = new CategoryModel();//运行这个出错====求大神解决1
$list=$cat->relation(true)->find(1);
dump($list);
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询