今天发现了个神奇的函数,稍作记录下
<?php
date_default_timezone_set('Asia/shanghai');
function __autoload($class_name) {
$path=dirname(__FILE__)."/class/$class_name";
require_once $path . '.php';
}
// 这里会自动加载 当前目录/class/File_Interface.php 文件
$a = new File_Interface();
?>