Better autoload for required files
Add autoload function to main config file. Add better DIR declarations in config file based on __DIR__ for libs & smarty classes. Load all class files with the new autoload function in header & direct file calls.
This commit is contained in:
@@ -39,12 +39,7 @@
|
||||
// put into separete function in this class)
|
||||
|
||||
// try to include file from LIBS path, or from normal path
|
||||
$include_file = 'Class.DB.IO.inc';
|
||||
foreach (array('', LIBS, __DIR__.'/') as $folder)
|
||||
{
|
||||
if (file_exists($folder.$include_file))
|
||||
require_once($folder.$include_file);
|
||||
}
|
||||
_spl_autoload('Class.DB.IO.inc');
|
||||
|
||||
// subclass for one array handling
|
||||
class db_array_io extends db_io
|
||||
|
||||
Reference in New Issue
Block a user