Class 'Home\Controller\CommonModel' not found,大神们,帮帮小弟吧
IndexController.class.php的内容:
<?php
namespace Home\Controller;
use Think\Controller;
use Home\Model;
class IndexController extends Controller {
public function index(){
$result=new CommonModel();
$re=$result->strMake(aaa);
var_dump($re);
}
}
Model/CommonModel.class.php内容:
<?php
namespace Home\Model;
use Think\Model;
class CommonModel extends Model{
public function strMake($str){
return md5($str);
}
}
总是提示Class 'Home\Controller\CommonModel' not found,如何解决呢?