autoload那個地方似乎有點問題,我試了一下,如果調用spl_autoload_register()方法后如果找不到類的話是不會再去調用__autoload()方法了,而是直接拋錯,這點老師確認一下。
2014-12-09
class_parents() class_implements() iterator_count() iterator_apply() iterator_to_array()
2014-11-20
最贊回答 / slcheng
__autoload() 不用注冊,在實例化一個類時,先從本文件里找,找不到再找spl_autoload_register注冊的函數里的方法去加載,再找不到就會調用默認的__autoload()?
2014-11-20
確實之前是使用function __autoload($class_name){}函數實現自動加載 現在回過頭來終于發現當初的代碼為什么會和PHPExcel的自動加載方式有沖突了 統一使用spl_autoload_*()方法就可以避免此類問題
2014-11-20
最新回答 / 慕妹3887762
在php的早期版本中,使用ini_set來設置,所以這個include_path實際上是定義在php_ini中的。ini_set('include_path',?'/usr/lib/pear');
2014-11-20
sql_autoload_extension('.class.php,.inc.php');
可以使用逗號進行分割
可以使用逗號進行分割
2014-11-20