–>spl_autoload_register— 将给定的函数注册为__autoload()函数使用
注:spl_autoload_register(array(__CLASS__, ‘crystal_autoload’));该类的crystal_autoload方法必须为static
2.include_path
指定一组目录用于 require(),include() 和 fopen_with_path() 函数来寻找文件。格式和系统的 PATH 环境变量类似:一组目录的列表,在 UNIX 下用冒号分隔,在 Windows 下用分号分隔。
Example #1 Unix include_path
include_path=".:/php/includes"
Example #2 Windows include_path
include_path=".;c:\php\includes"
在包含路径中使用 . 可以允许相对路径,它代表当前目录。
注:分割符号可以用常量PATH_SEPARATOR来指定
get_include_path()可以获取现有系统设置的include_path;set_include_path()可以设置include_path