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

php _autoload函数用法

WBOY
Release: 2016-06-13 13:16:28
Original
1086 people have browsed it

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

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

}



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

$p=new mysql();

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template