illustrate
1. Automatic loading means that during instantiation, PHP automatically hands over the required files to require, and there is no need to manually require.
2. Laravel, thinkphp, yii2 and other frameworks are based on automatic loading of files. Autoloading can be said to be the core foundation of the modern PHP framework.
Example
In traditional applications, __autoload() is usually customized. as follows
define("DIR", "/var/www/myWeb/myClass/"); function __autoload($classname) { require DIR.$classname.'.class.php'; } $book = new Book();
The above is an introduction to the PHP automatic loading mechanism. I hope it will be helpful to everyone.