Home >Backend Development >PHP Tutorial > php _autoload函数用法

php _autoload函数用法

WBOY
WBOYOriginal
2016-06-13 13:16:281083browse

php __autoload函数用法
function __autoload($class){

      include_once("path".$class.".php");

}



自动加载后直接实例化$class类

$p=new mysql();

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