Answer the question
In order to leave comments, you need to log in
Why doesn't Yii find the class when calling it in the web folder?
There is a test.php file, it is in the web/example folder (I need access to the script via the link, so I threw it there)
The contents of test.php
<?php
use app\models\User;
User::findOne(1);
Answer the question
In order to leave comments, you need to log in
Because you need to connect autoload
Or connect the file directly via require_once for example.
autoload
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question