What is the principle of _ autoload? listen & nbsp; say it is automatic loading. do you mean it is to load all the files in the same directory of _ autoload. It seems like this, but it is vague to read a lot of materials that are not clearly written ., When you instantiate a class, if the file is not loaded, the _ auto _ autoload principle is automatically triggered.
It indicates automatic loading. does it mean loading all the files in the same directory as the write _ autoload file. It seems like this, but it is vague to read a lot of materials that are not clearly written.
------ Solution --------------------
When you instantiate a class, if this file is not loaded, the _ autoload ($ classname) method will be automatically triggered and the class will be loaded in the _ autoload () method.
In the method, you need to include the address of the file where this class is located.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service