控制器文件 vcode.php 位于 api/controller 下
/*
检查验证码
*/
public static function check($cellphone, $code)
{
$data = Loader::model('Vcode')->getSendTime($cellphone, $code);
}模型文件 vcode.php 位于 api/model下public function getSendTime($cellphone, $code)
{
$map['cellphone'] = $cellphone;
$map['code'] = $code;
return $this->field('send_time')->where($map)->find();
}在 apply/controller 下的文件 text.phpuse app\api\controller\Vcode as ApiVocde;
public function add()
{
ApiVocde::check('13312345678', '2231');
} 调用会报错:类不存在 :app\common\model\Vcode
请教如何解决?
最佳答案