摘要: 文件hello.php和index.php在同一目录hello.php [2] => class hello{ [3] => [4] => public function __construct() [5] => { [6] => ... 阅读全文
posted @ 2015-05-11 11:44 yikai.shao 阅读(698) 评论(0) 推荐(0) 编辑
摘要: 举个例子就可以看懂了: 同一目录中有2个文件index.php和test.php,在test.php中定义一个test类。 test.php index.php 尽管 __autoload() 函数也能自动加载类和接口,但更建议使用 spl_autoload_register() 函数。 spl_a 阅读全文
posted @ 2015-05-11 09:20 yikai.shao 阅读(235) 评论(0) 推荐(0) 编辑