Home  >  Article  >  Backend Development  >  php _autoload函数用法

php _autoload函数用法

WBOY
WBOYOriginal
2016-06-13 10:40:33801browse

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
Previous article:预约义变量 PHPNext article:让CI显示PHP异常