您的位置:首页 > 编程语言 > PHP开发

thinkphp3.2.3编译时new model()出错的处理方法

2015-09-09 15:01 525 查看
IndexController.class.php中代码如下:(没有红字部分)

<?php

namespace Home\Controller;

use Think\Controller;

use Think\Model;

class IndexController extends Controller {

public function index(){

$db = new Model('user');

$select = $db->select();

$this->assign('select',$select);

$this->display();

}

}

总是提示Class 'Home\Controller\Model' not found

提示new Model那一行出错,后来加上了红字部分就好了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: