Re: __autoLoad php5 callback is being triggered for every class ?

From: Date: Fri, 29 Apr 2005 11:32:08 +0000
Subject: Re: __autoLoad php5 callback is being triggered for every class ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-214200@lists.php.net to get a copy of this message
php@electroteque.org wrote:
I'm experiencing some issues with autoLoad with pear packages. DB_Error is contained within the DB.php, but my autoload method is trying to split the underscores with forward slashes and then load. Supressing errors with @ still doesnt work, its triggering a php error. Any ideas ?
__autoload() gets called whenever you reference a class that has not been defined. additionally its called if you call class_exists() and the class doesn't ... unless you call class_exists() with the second parameter to false. if your __autoload() is being called then the class is not loaded.... and from what you say its seems your autoload function can't find the relevant file - whats the function look like?

« previous php.general (#214200) next »