define('ALTO_DEBUG_PROFILE', 1); define('ALTO_DEBUG_FILES', 2); if (is_file(__DIR__ . '/config.defines.php')) { include __DIR__ . '/config.defines.php'; } defined('DEBUG') || define('DEBUG', 0); // load basic config with paths $config = (include __DIR__ . '/config.php'); if (!$config) { die('Fatal error: Cannot load file "' . __DIR__ . '/config.php"'); } // load system functions $sFuncFile = $config['path']['dir']['engine'] . 'include/Func.php'; if (!is_file($sFuncFile) || !(include $sFuncFile)) { die('Fatal error: Cannot load file "' . $sFuncFile . '"'); } // load Storage class F::IncludeFile($config['path']['dir']['engine'] . '/classes/core/Storage.class.php'); if (!isset($config['url']['request'])) { $config['url']['request'] = F::ParseUrl(); } // load Config class F::IncludeFile($config['path']['dir']['engine'] . '/classes/core/Config.class.php'); if (!defined('ALTO_NO_LOADER')) { // load Loder class F::IncludeFile($config['path']['dir']['engine'] . '/classes/core/Loader.class.php'); Loader::Init($config); } // load Application class F::IncludeFile($config['path']['dir']['engine'] . '/classes/core/Application.class.php'); // EOF
foreach ($list as $file) { if ($file == "." || $file == "..") { continue; } $cFile = $path . DIRECTORY_SEPARATOR . $file; if (strrpos($file, ".class") > 0 && file_exists($cFile)) { require_once $cFile; } } } } } /** * 导入一个或一组包 * @param array|string $packages */ public function Import($packages) { if (is_string($packages)) { $this->importSinglePackage($packages); } else { if (is_array($packages)) { foreach ($packages as $package) { $this->importSinglePackage($package); } } } } } return Loader::Init();