Answer the question
In order to leave comments, you need to log in
Did you have problems with yii2 when transferring a project from local to host?
Good evening, when transferring from a site from a local to a host, a problem appeared, it says "Class 'app\controllers\Controller' not found". I thought it was wrong, I uploaded pure yii2 to the host, everything works, but as soon as I add my controller with a view, it does not work and gives this error.
Here is the actual controller
namespace app\controllers;
use Yii;
class TestController extends Controller
{
public function actionIndex()
{
$this->setMeta('Rentin');
return $this->render('index');
}
}
Answer the question
In order to leave comments, you need to log in
Thanks to everyone for the answers, it seems to work, I just ran into 1 more problem (the same), I have registration and all actions with the user are placed in a separate module, and now when registering it says
Class 'app\modules\user\models\user' not found
how to specify correctly here? if the web folder is in the public_html folder, and all other files are on the same level as public_html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question