Blogger Information
Blog 34
fans 0
comment 0
visits 19971
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
类的自动加载器
OC的PHP大牛之路
Original
364 people have browsed it
  1. spl_autoload_register(function ($class) {
  2. require $class.'.php';
  3. });
  1. require 'autoloader.php';
  2. use admin\controller\Demo1;
  3. use admin\controller\Demo2;
  4. use admin\controller\Demo3;
  5. echo Demo1::index(). '<br>';
  6. echo Demo2::index(). '<br>';
  7. echo Demo3::index(). '<br>';
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:多用自己的实例
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post