![](/img/trans.png)
[英]Why am I getting "Class 'app\models\Yii' not found" error?
[英]I did user authentication and in the localhost it works fine but on the server I'm getting this error:: Class '\app\models\User' not found
在线运行项目时,这是标记区域:
$this->_user = User::findByUsername($this->username);
首先检查服务器上是否存在 \models\User.php
第二个可能是你在本地主机上使用 windows 而在服务器上使用 Linux/Unix.. 在这种情况下检查你 class 中的正确大小写字符.. 可能是你有
`user.php`
代替
`User.php'
您应该确保它被正确包含,例如添加的名称空间具有正确的字符大小写并且适用于 go
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.