1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
<?php
define ('CLASS_FILE_SUFFIX' , '.class.php');
require_once 'pat/patErrorManager.php';
require_once 'pat/patError.php';
require_once 'pat/patTemplate.php';
function __autoload($className) {
if(stripos($className,'patTemplate') === false)
{
$autoloadPath = dirname(__FILE__);
$installDir = $autoloadPath . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR;
$myAppClasspath = PATH_SEPARATOR . $installDir . 'Base' .
PATH_SEPARATOR . $installDir . 'config' .
PATH_SEPARATOR . $installDir . 'model' .
PATH_SEPARATOR . $installDir . 'view' .
PATH_SEPARATOR . $installDir . 'controller';
$systemIncludePath = get_include_path() ;
set_include_path( $systemIncludePath . $myAppClasspath );
require_once ($className. CLASS_FILE_SUFFIX);
set_include_path( $systemIncludePath );
}
}
?> |
Partager