Home >Backend Development >PHP Tutorial >yii - PHP uses use to introduce namespace error
Can anyone tell me why the error is displayed here
An open source project I downloaded did not report an error
When the mouse is placed on it, it will prompt undefined class
The server is operational. The project was pulled from git.
The server URL is http://182.61.37.188/
Can anyone tell me why the error is displayed here
An open source project I downloaded did not report an error
When the mouse is placed on it, it will prompt undefined class
The server is operational. The project was pulled from git.
The server URL is http://182.61.37.188/
Are you sure the class name you referenced exists? Or is there this class under the corresponding path?
Is this an error reported by PHPStorm?
Owner, check if the namespace of the class you use is written correctly
In fact, this is a warning from the IDE. If it does not affect the normal operation of the project, you can ignore it
To be honest, if you use git to pull the code, you need to execute composer install
, and vendor
does not need to be added to version control. If you are not a regular soldier, just pretend I didn't say it.
Life insurance, whether the project uses composer, if so, please check whether the project is downloaded directly or installed by composer. If it is downloaded, please use the install command of compose to install the dependency package.
If the project does not use composer's auto-loading component, please check whether the auto-loading related process is registered normally.
It seems that the dependencies are not installed
It seems that you have successfully installed the dependencies using the composer install command. Congratulations, you are one step closer to becoming a master
Don’t use windows, don’t trust IDE