[eluser]Unknown[/eluser]
Hi there !
I need help in the following problem, i have about 50 models in the models directory.
These models represent data in xml files, i was using the spl_autoload_register like this:
Code:
function solap_auto_require($class) {
if(!strstr($class, 'CI') && !stristr($class, 'PEAR')) {
@require_once(APPPATH."models/{$class}.php");
}
}
spl_autoload_register('solap_auto_require');
Which was working fine, until i decided to organize the models, and put them into different folders.
I changed the function to:
Code:
function solap_auto_require($class) {
if(!strstr($class, 'CI') && !stristr($class, 'PEAR')) {
@require_once(APPPATH."models/folder1/{$class}.php");
@require_once(APPPATH."models/folder2/{$class}.php");
@require_once(APPPATH."models/folder3/{$class}.php");
}
}
spl_autoload_register('solap_auto_require');
And my application just
stopped working.
Any thoughts ?