Namespace Problem

Posted on 16th Feb 2014 by admin

I'm having problem with a section of code with a variable namespace.

This code works fine:
Line number On/Off | Expand/Contract $c = new AppsAdminViewsIndex;

However this code does not:
Line number On/Off | Expand/Contract echo $val[1];// Outputs AppsAdminViewsIndex; $c = new $val[1] //( ! ) Fatal error: spl_autoload() [function.spl-autoload]: Class AppsAdminViewsIndex could not be loaded in C:wampwww_devRainUrlsRouter.php on line 69

My "autoloader" (PHP handles namespace autoloading automatically):

Line number On/Off | Expand/Contract spl_autoload_extensions(".php");spl_autoload_register();

I've trawled through the manual with no luck..

Other forums