PHP has two kinds of automatic loading mechanism function [PHP] __autoload (); Spl_autoload_register (); 1. __autoload () load the file into the program when you need to use the class [PHP] Spl_autoload_functions Spl_autoload_register (' load2 '); $index = new index (); The class will be loaded first through LOAD1, if not in Load1, and then loaded through load2, if there is a second analogy. Implementation of an automatic loading method is more, this example of a [PHP] Can also be based on their own needs to design the implementation
http://www.bkjia.com/PHPjc/477831.html www.bkjia.com true http://www.bkjia.com/PHPjc/477831.html techarticle PHP has two kinds of automatic loading mechanism function [PHP] __autoload (); Spl_autoload_register (); 1. __autoload () load the file into the program when you need to use the class [PHP]? PHP function ...