Esempio n. 1
0
 public static function init()
 {
     if (defined('litepublisher_mode') && litepublisher_mode == 'debug') {
         litepublisher::$debug = true;
     }
     if (!preg_match('/(www\\.)?([\\w\\.\\-]+)(:\\d*)?/', strtolower(trim($_SERVER['HTTP_HOST'])), $domain)) {
         die('cant resolve domain name');
     }
     self::$domain = $domain[2];
     $home = dirname(__FILE__) . DIRECTORY_SEPARATOR;
     $storage = $home . 'storage' . DIRECTORY_SEPARATOR;
     $paths = new tpaths();
     self::$paths = $paths;
     $paths->home = $home;
     $paths->lib = $home . 'lib' . DIRECTORY_SEPARATOR;
     $paths->data = $storage . 'data' . DIRECTORY_SEPARATOR;
     $paths->cache = $storage . 'cache' . DIRECTORY_SEPARATOR;
     $paths->libinclude = $home . 'lib' . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR;
     $paths->languages = $home . 'lib' . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR;
     $paths->storage = $storage;
     $paths->backup = $storage . 'backup' . DIRECTORY_SEPARATOR;
     $paths->plugins = $home . 'plugins' . DIRECTORY_SEPARATOR;
     $paths->themes = $home . 'themes' . DIRECTORY_SEPARATOR;
     $paths->files = $home . 'files' . DIRECTORY_SEPARATOR;
     $paths->js = $home . 'js' . DIRECTORY_SEPARATOR;
     self::$microtime = microtime(true);
 }
Esempio n. 2
0
 public static function init()
 {
     if (!preg_match('/(www\\.)?([\\w\\.\\-]+)(:\\d*)?/', strtolower(trim($_SERVER['HTTP_HOST'])), $domain)) {
         die('cant resolve domain name');
     }
     self::$domain = $domain[2];
     $home = dirname(__FILE__) . DIRECTORY_SEPARATOR;
     self::$_paths = array('home' => $home, 'lib' => $home . 'lib' . DIRECTORY_SEPARATOR, 'libinclude' => $home . 'lib' . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR, 'languages' => $home . 'lib' . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR, 'data' => $home . 'data' . DIRECTORY_SEPARATOR . self::$domain . DIRECTORY_SEPARATOR, 'cache' => $home . 'cache' . DIRECTORY_SEPARATOR . self::$domain . DIRECTORY_SEPARATOR, 'plugins' => $home . 'plugins' . DIRECTORY_SEPARATOR, 'themes' => $home . 'themes' . DIRECTORY_SEPARATOR, 'files' => $home . 'files' . DIRECTORY_SEPARATOR, 'backup' => $home . 'backup' . DIRECTORY_SEPARATOR, 'js' => $home . 'js' . DIRECTORY_SEPARATOR);
     self::$paths = new tpaths();
     self::$microtime = microtime();
 }