1 Star 1 Fork 0

Aii如樱如月/MkTcpedia-mediawiki

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
LocalSettings.php 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
Aii如樱如月 提交于 2021-03-24 10:22 . First uploaded
<?php
// 包含公共设置到每个wiki在这行之后
switch ( $_SERVER['SERVER_NAME'] ) {
case '主站域名':
require_once 'LocalSettings_wiki.php';
break;
case '共享站域名':
require_once 'LocalSettings_wikifile.php';
break;
default:
header( 'HTTP/1.1 404 Not Found' );
echo 'This wiki is not available. Check configuration.';
exit( 0 );
}
if ( defined( 'MW_DB' ) ) {
// Set $wikiId from the defined constant 'MW_DB' that is set by maintenance scripts.
$wikiId = MW_DB;
} elseif (isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] == '主站域名') {
// Add a value to the $wikiId variable for e.g. https://wiki1.example.org/
$wikiId = 'wiki';
} elseif (isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] == '共享站域名') {
// Add a value to the $wikiId variable for e.g. https://example.org/wiki2
$wikiId = 'wikifile';
} else {
// Fail gracefully if no value was set to the $wikiId variable, i.e. if no wiki was determined
die( 'It was not possible to determine the wiki ID.' );
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/morikawa56/mk-tcpedia.git
git@gitee.com:morikawa56/mk-tcpedia.git
morikawa56
mk-tcpedia
MkTcpedia-mediawiki
master

搜索帮助