曾与蒿藜同雨露,한때 잡초와 쑥과 함께 비와 이슬을 나누던 곳이 이제는 소나무와 삼나무와 함께 서리와 눈을 견뎌내고 있다.终随松柏到冰霜.かつては雑草やヨモギと共に雨や露を分かち合っていたが、今では松やヒノキと共に霜や雪に耐えている。曾与蒿藜同雨露,Once sharing rain and dew with weeds and wormwood, now enduring frost and snow with pines and cypresses.终随松柏到冰霜.曾与蒿藜同雨露한때 잡초와 쑥과 함께 비와 이슬을 나누던 곳이 이제는 소나무와 삼나무와 함께 서리와 눈을 견뎌내고 있다.,终随松柏到冰霜.譖セ荳手珍阯懷酔髮ィ髴イ�檎サ磯囂譚セ譟丞芦蜀ー髴�曾与蒿藜同雨露,鏇句笌钂胯棞鍚岄洦闇诧紝缁堥殢鏉炬煆鍒板啺闇�终随松柏到冰霜.曾与蒿藜同雨露,한때 잡초와 쑥과 함께 비와 이슬을 나누던 곳이 이제는 소나무와 삼나무와 함께 서리와 눈을 견뎌내고 있다.终随松柏到冰霜.曾与蒿藜同雨露,终随松柏到冰霜.
<?php
/**
* XOOPS main configuration file
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright (c) 2000-2026 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 (https://www.gnu.org/licenses/gpl-2.0.html)
*/
if (!defined('XOOPS_MAINFILE_INCLUDED')) {
define('XOOPS_MAINFILE_INCLUDED', 1);
// XOOPS Physical Paths
// Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
define('XOOPS_ROOT_PATH', '[[softpath]]');
// For forward compatibility
// Physical path to the XOOPS library directory WITHOUT trailing slash
define('XOOPS_PATH', '[[softdatadir]]/xoops_lib');
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
define('XOOPS_VAR_PATH', '[[softdatadir]]/xoops_data');
// Alias of XOOPS_PATH, for compatibility, temporary solution
define('XOOPS_TRUST_PATH', XOOPS_PATH);
// Protocol detection for SSL and proxy compatibility
$IS_HTTPS = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
|| (isset($_SERVER['SERVER_PORT']) && (int)$_SERVER['SERVER_PORT'] === 443)
|| (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
|| (isset($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] === 'on')
|| (isset($_SERVER['HTTP_X_FORWARDED_PORT']) && (int)$_SERVER['HTTP_X_FORWARDED_PORT'] === 443)
|| (isset($_SERVER['REDIRECT_HTTPS']) && $_SERVER['REDIRECT_HTTPS'] === 'on');
define('XOOPS_PROT', $IS_HTTPS ? 'https://' : 'http://');
unset($IS_HTTPS);
// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', '[[softurl]]');
define('XOOPS_URL', '[[softurl]]');
// in mainfile.php - add this if it doesn't exist
if (!defined('XOOPS_COOKIE_DOMAIN_USE_PSL')) {
define('XOOPS_COOKIE_DOMAIN_USE_PSL', true);
}
// XOOPS Cookie Domain to specify when creating cookies. May be blank (i.e. for IP address host),
// full host from XOOPS_URL (i.e. www.example.com) or just the registered domain (i.e. example.com)
// to share cookies across multiple subdomains (i.e. www.example.com and blog.example.com)
define('XOOPS_COOKIE_DOMAIN', '[[domhost]]');
// Shall be handled later, don't forget!
define('XOOPS_CHECK_PATH', 0);
// Protect against external scripts execution if safe mode is not enabled
if (XOOPS_CHECK_PATH) {
if (function_exists('debug_backtrace')) {
$xoopsScriptPath = debug_backtrace();
if (!count($xoopsScriptPath)) {
die('XOOPS path check: this file cannot be requested directly');
}
$xoopsScriptPath = $xoopsScriptPath[0]['file'];
} else {
$xoopsScriptPath = $_SERVER['PATH_TRANSLATED'] ?? $_SERVER['SCRIPT_FILENAME'];
}
if (DIRECTORY_SEPARATOR !== '/') {
// IIS6 may double the \ chars
$xoopsScriptPath = str_replace(strpos($xoopsScriptPath, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $xoopsScriptPath);
}
if (strcasecmp(substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR, '/', XOOPS_ROOT_PATH))) {
exit('XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.');
}
}
// Debug settings are read from xoops_data/data/debug.php when that file exists.
// Copy debug.dist.php beside it to switch debugging on, instead of editing this
// file -- mainfile.php also holds your database credentials and is never replaced
// on upgrade, which is what made the old approach awkward.
//
// No debug.php present means production behaviour, exactly as before.
// Guarded: include_once only WARNS on a missing file, and calling the function would
// then be a fatal "Call to undefined function" -- taking the whole site down before
// secure.php is even read. mainfile.php survives upgrades while include/ is replaced,
// so a partial or interrupted upgrade can genuinely produce this pairing.
$xoopsDebugConfig = [];
$xoopsDebugLoader = XOOPS_ROOT_PATH . '/include/debugconfig.php';
if (is_readable($xoopsDebugLoader)) {
// try/catch, not just is_readable(). The realistic failure here is not a MISSING
// file -- is_readable() covers that -- but a TRUNCATED one, left by an upload or
// a write that died halfway. That is a ParseError, and a ParseError raised by an
// include IS catchable, unlike one in this file. Fail closed to production.
try {
require_once $xoopsDebugLoader;
} catch (\Throwable $e) {
// Deliberately silent. Nothing has configured error display yet, so anything
// said here is said under php.ini's rules -- which on a misconfigured host
// means a path printed to whoever loaded the page.
//
// Nothing is recorded either: xoops_setDebugConfigError() lives in the file
// that just failed to parse. It records a broken debug.php, not a broken
// debugconfig.php, and an earlier comment here claimed otherwise.
}
}
unset($xoopsDebugLoader);
// BOTH functions, not just the first. They live in one file, so a half-written copy
// of it is exactly the state that defines one and not the other -- and calling the
// missing one is a fatal before secure.php is even read.
if (function_exists('xoops_getDebugConfig') && function_exists('xoops_applyDebugConfig')) {
$xoopsDebugConfig = xoops_getDebugConfig();
// Unconditionally: it publishes XOOPS_ENVIRONMENT and XOOPS_ENV before it looks
// at the config at all, and those are documented as existing on every request.
// With no debug.php it defines them and returns.
xoops_applyDebugConfig();
}
define('XOOPS_DB_LEGACY_LOG', !empty($xoopsDebugConfig['database']['legacy_log']));
define('XOOPS_DEBUG', [] !== $xoopsDebugConfig); // Also shows E_USER_DEPRECATED notices
unset($xoopsDebugConfig);
// Secure file
require XOOPS_VAR_PATH . '/data/secure.php';
define('XOOPS_GROUP_ADMIN', '1');
define('XOOPS_GROUP_USERS', '2');
define('XOOPS_GROUP_ANONYMOUS', '3');
if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '') {
include XOOPS_ROOT_PATH . '/include/common.php';
}
}