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那一行出错,后来加上了红字部分就好了。