Пример #1
0
 /**
  * 构造函数
  *
  * @param string $pConfigFile 配置文件名
  * @param string $pRootPath   根目录位置
  */
 public function __construct($pConfigFile = null, $pRootPath = null)
 {
     $cache_path = '/dev/shm/temp/cache';
     //sys_get_temp_dir();
     if (file_exists($cache_path) && is_writable($cache_path)) {
         $front = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
         $this->_auto_load_cache_file = realpath($cache_path) . DIRECTORY_SEPARATOR . 'kiss_' . md5($front . $_SERVER['PHP_SELF']);
     }
     if (!is_null($this->_auto_load_cache_file) && file_exists($this->_auto_load_cache_file)) {
         self::$_load_array = unserialize(file_get_contents($this->_auto_load_cache_file));
         foreach (self::$_load_array as $file) {
             if (file_exists($file)) {
                 include_once $file;
             }
         }
     }
     KISS_Framework_Config::init($pConfigFile, $pRootPath);
 }