Here's what the class loader looks like:
loader.php
class Load
{
public static function init($class)
{
require_once 'classes/' . $class . '.php';
return new $class();
}
}
$class = Load::init('MyClass');
The error being returned is:
Fatal error: Class 'MyClass' not found in /www/website/application/models/Database/loader.php on line 5
If I put an echo 'WORKS';
into MyClass.php, I can see that it isn't being included. That echo
doesn't execute.
UPDATE: It seems I've been editing a cached version of my code and not the actual file... The code works :}