testInstall(); // ///////////////////////////////////////////////////////////////////// error_reporting(E_ALL); define('__SMARTY_DIR', BASE_DIR . '/lib/Smarty/src/'); // Global function declarations //require_once(__SMARTY_DIR . "/functions.php"); require(BASE_DIR . '/lib/Smarty/src/functions.php'); spl_autoload_register(function ($class) { // Class prefix $prefix = 'Smarty\\'; // Does the class use the namespace prefix? $len = strlen($prefix); if (strncmp($prefix, $class, $len) !== 0) { // If not, move to the next registered autoloader return; } // Hack off the prefix part $relative_class = substr($class, $len); // Build a path to the include file $file = __SMARTY_DIR . str_replace('\\', '/', $relative_class) . '.php'; // If the file exists, require it if (file_exists($file)) { require_once($file); } });