Home > Article > Backend Development > What to do if php use reports an error
Solution to php use error: 1. Open the corresponding code file; 2. Use require to introduce the file; 3. Use use to introduce the namespace file.
#The operating environment of this article: Windows 7 system, PHP version 7.1, Dell G3 computer.
What should I do if php use reports an error?
hp use reports an error after introducing a file
Record it:
Question:
Native php use reports an error after introducing the file, indicating that the file is not found.
Reason:
Native PHP does not have an automatic file import mechanism, so you need to require the import file before use, then use use to import the namespace file, and then use it.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What to do if php use reports an error. For more information, please follow other related articles on the PHP Chinese website!