<?php
/*
 * @Author: 云业科技
 * @Date: 2023-01-05 00:12:01
 * @LastEditTime: 2023-01-05 17:59:32
 * @LastEditors: 云业科技
 * @Description: 
 * @FilePath: \v221.yunyecms.yunyehui.cn\core\config\const.php
 * 
 */
if (PHP_VERSION < '5.2.0') die('require  php version >5.2.0 ');
$doc_root = $_SERVER['DOCUMENT_ROOT'];
if (!empty($doc_root) && substr($doc_root, -1) == "/") {
    $doc_root = substr($doc_root, 0, -1);
}
$filename = $_SERVER['SCRIPT_FILENAME'];
if (strpos($doc_root, "\\")) {
    $doc_root = str_ireplace('\\', '/', $doc_root);
}
if (strpos($filename, "\\")) {
    $filename = str_ireplace('\\', '/', $filename);
}
$site_root = str_ireplace($doc_root, '', $filename);
$site_root = substr($site_root, 0, strrpos($site_root, '/') + 1);
define('ROOT', $site_root);
strlen(ROOT) > 1 ? define('RD', substr(ROOT, 0, -1)) : define('RD', "");
define('MAGIC_QUOTES_GPC', ini_set("magic_quotes_runtime", 0) ? True : False);
define('YUNYECMS_START_TIME', microtime(true));
define('YUNYECMS_ROOT', str_ireplace('\\', '/', realpath(dirname(__FILE__) . '/../../')) . '/');
define('YUNYECMS_EXTEND', YUNYECMS_ROOT . "core/extend/");
define('YUNYECMS_CORE', YUNYECMS_ROOT . "core/");
define('YUNYECMS_CLASS', YUNYECMS_ROOT . "core/lib/");
define('YUNYECMS_CONFIG', YUNYECMS_ROOT . "core/config/");
define('YUNYECMS_FUN', YUNYECMS_ROOT . "core/func/");
define('YUNYECMS_ADDONS', YUNYECMS_ROOT . "addons/");
define('SITE_URL', (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''));
define('DOMAIN', (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://" . SITE_URL);
define('YUNYECMS_DATA', YUNYECMS_ROOT . "data/");
define('YUNYECMS_ADMSESSION', YUNYECMS_ROOT . "data/admin/admsess/");
define('YUNYECMS_SESSION', YUNYECMS_ROOT . "data/sessions/");
define('YUNYECMS_LAN', "gb");
define('YUNYECMS_PUBLIC', ROOT . "public/");
define('YUNYECMS_UI', ROOT . "public/ui/");
define('THEME', ROOT . "theme/");
define('ADDONS', ROOT . "addons/");
define('CACHE_ROOT', YUNYECMS_DATA . "caches/");
define('CACHE_AUTO_UPDATE', false);
define('APP_DEBUG', false);
define('APP_PATH', YUNYECMS_ROOT . "core/app/");
