[eluser]DIY_Peter[/eluser]
Sorry, you're correct.
We used Phil Sturgeon’s autoload code
Code:
/*
| -------------------------------------------------------------------
| Native Auto-load
| -------------------------------------------------------------------
|
| Nothing to do with config/autoload.php, this allows PHP autoload to work
| for base controllers and some third-party libraries.
|
*/
function __autoload($class)
{
if (strpos($class, 'CI_') !== 0):
@include_once( APPPATH . 'core/'. $class . EXT );
endif;
}
But we defined a constant COREPATH so we can put the core files in a central location on the server.
Code:
function __autoload($class)
{
if(strpos($class, 'CI_') !== 0)
{
@include_once( COREPATH . 'core/'. $class . EXT );
}
}
This does not seem to work for the core classes that are loaded automaticaly.
Is there a way to use a central location for the core,library and helper files?
I want to be able to use the same classes from all my applications, without having to copy them each time I start a new application. This makes updating these files difficult because they are scattered all over my site.
For the libraries en helpers I now use a symbolic link so that the folder points to the central location, but i've got a feeling that's not the correct way to do it.
Can't find anything about this on the codeigniter site. Strange, because it seems like a common problem.