PHP
walk_in
这个作者很懒,什么都没留下…
展开
-
php自动加载类的实现 spl_autoload_register
自动加载类。1.创建一个自动加载函数,2.将该函数通过sql_autoload_register注册到函数队列中function core_autoload($class_name) { $prefix = substr($class_name,0,2); switch($prefix){ case 'm_': $file_name =转载 2016-12-03 14:29:36 · 1340 阅读 · 0 评论 -
get_included_files函数
get_included_files可以以数组的形式显示目前引入的所有文件名称<?phpinclude 'test1.php';include_once 'test2.php';require 'test3.php';require_once 'test4.php';$included_files = get_included_files();foreach ($includ原创 2016-12-03 14:43:28 · 963 阅读 · 0 评论