, automatic loading mechanism
function __autoload() { //
$path = str_replace('_', '/', $class_name);
require_once $path . '.php';
}
// The Http/File/Interface.php file will be automatically loaded here
$a = new Face();
When a class is instantiated, the corresponding class file will be loaded
http://www.bkjia.com/PHPjc/760668.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/760668.htmlTechArticle, automatic loading mechanism function __autoload( ) { // $path = str_replace('_', '/', $class_name); require_once $path . '.php'; } // The Http/File/Interface.php file will be automatically loaded here...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn