Hi Gergely:
> foo.php:
> <?php
> throw new Exception();
> class foo {}
>
> bar.php:
> <?php
> class bar extends foo {}
>
> <?php
> function __autoload($className)
> {
> include $className.'.php';
> }
> function error_handler()
> {
> throw new Exception();
> }
> set_error_handler("error_handler");
> new bar();
> ---------------------------------------------
> Result: "Fatal error: Class 'bar' not found".
The fact that the class "bar" is not found indicates that your include in
the autoload is either totally failing or gathering some other files.
Make your life better by specifying the path in the include statement
rather than relying on the include_path.
Also, you would have known this on your own if you better utilized the
error handler:
function error_handler($errno, $errstr, $errfile, $errline) {
echo "survey says... $errstr <br />\n";
}
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php