Spl_autoload_register What to do if the load fails?
Today's study encountered two questions, first of all, I use wamp,php5.3.9,
When learning the functions of automatically loading classes
1.__autoload ($className) is dead or alive, I echo inside, but no output, then PHP does not automatically call it.
2. When 1 didn't work, I found Spl_autoload_register, and this really worked. But I have a question, how to deal with the more friendly when there is really no required class file? For example Http://localhost/index.php?action=Unknow does not exist for this UnknowAction.class.php, this case is fatal. I want to jump to another error.php page.
Thank you
------Solution--------------------
PHP Code
------Solution--------------------
Want to jump words with the header function or output a section of JS to jump on the line.
------Solution--------------------
Better not use this Ah, not too flexible.