Re: class_exists and __autoload

From: Date: Tue, 28 Jun 2005 22:01:16 +0000
Subject: Re: class_exists and __autoload
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-16970@lists.php.net to get a copy of this message
Hi James, On Tuesday 28 June 2005 23:32, James Crumpton wrote: > function __autoload($name) { > require_once($name); > } > I just don't understand the logic behind throwing a fatal error when I'm > writing code to try and prevent one from occurring. You should add error checking to your autoload function. Either by some file_exists()/is_readable() check or by using include instead of require (maybe even with suppressing errors if you dislike is_readable()...) For more please ask on the generals list or some other support forum. johannes

« previous php.internals (#16970) next »