Discuz! X config - global.php配置注释教程 联系客服

发布时间 : 星期四 文章Discuz! X config - global.php配置注释教程更新完毕开始阅读146001c35fbfc77da269b196

Discuz! X config_global.php配置注释教程

$_config = array();

$_config['db'][1]['dbhost'] = 'localhost'; //服务器地址 $_config['db'][1]['dbuser'] = 'root'; //用户 $_config['db'][1]['dbpw'] = 'root'; //密码 $_config['db'][1]['dbcharset'] = 'gbk'; //字符集

$_config['db'][1]['pconnect'] = 0; //是否持续连接

$_config['db'][1]['dbname'] = 'ultrax'; //数据库 $_config['db'][1]['tablepre'] = 'pre_'; //表名前缀

$_config['memory']['prefix'] = 'discuz_';

$_config['memory']['eaccelerator'] = 1; //启动对 eaccelerator 的支持

$_config['memory']['xcache'] = 1; //启动对 xcache 的支持

$_config['memory']['memcache']['server'] = ''; //memcache 服务器地址

$_config['memory']['memcache']['port'] = 11211; //memcache 服务器端口

$_config['memory']['memcache']['pconnect'] = 1; //memcache 是否长久连接

$_config['memory']['memcache']['timeout'] = 1; //memcache 服务器连接超时

$_config['cache']['main']['type'] = '';

$_config['cache']['main']['file']['path'] = 'data/ultraxcache';

$_config['cache']['type'] = 'sql';//note 取值 file, sql

$_config['output']['charset'] = 'gbk'; //页面字符集

$_config['output']['forceheader'] = 1; //强制输出页面字符集,用于避免某些环境乱码

$_config['output']['gzip'] = 0; //是否采用 Gzip 压缩输出

$_config['output']['tplrefresh'] = 1; //模板自动刷新开关 0=关闭, 1=打开

$_config['output']['language'] = 'gbk'; //页面语言 gbk/big5

$_config['output']['staticurl'] = 'static/'; //站点静态文件路径,“/”结尾

$_config['cookie']['cookiepre'] = 'uchome_'; //COOKIE前缀

$_config['cookie']['cookiedomain'] = ''; //COOKIE作用域

$_config['cookie']['cookiepath'] = '/'; //COOKIE作用路径

$_config['app']['default'] = 'forum';

$_config['app']['domain']['forum'] = ''; //论坛绑定域名 $_config['app']['domain']['group'] = ''; //群组绑定域名 $_config['app']['domain']['home'] = ''; //用户中心绑定域名 $_config['app']['domain']['portal'] = ''; //门户绑定域名 $_config['app']['domain']['mobile'] = ''; //手机模式绑定域名

$_config['security']['authkey'] = 'asdfasfas'; //站点加密密钥

$_config['security']['urlxssdefend'] = true; //自身 url xss 防御

$_config['security']['attackevasive'] = 0; //cc 防御 1|2|4

$_config['admincp']['founder'] = '1'; //站点创始人:拥有站点管理后台的最高权限,每个站点可以设置 1名或多名创始人

$_config['admincp']['forcesecques'] = 0; // 管理人员必须设置安全提问才能进入系统设置 0=否, 1=是[安全]

$_config['admincp']['checkip'] = 1; // 后台管理操作是否验证管理员的 IP, 1=是[安全], 0=否。仅在管理员无法登陆后台时设置 0。

$_config['admincp']['runquery'] = 1; // 是否允许后台运行 SQL 语句 1=是 0=否[安全]

$_config['admincp']['dbimport'] = 1; // 是否允许后台恢复论坛数据 1=是 0=否[安全]

$_config['home']['allowdomain'] = 0; //个人空间是否启用二级域名 1=是 0=否

$_config['home']['domainroot'] = ''; //二级域名根域名,例如:discuz.net $_config['home']['holddomain'] = 'www,space,home,forum,portal'; //保留的二级域名,多个之间使用逗号\分开 ?>

首页资讯不显示 建议升级浏览器 然后div 添加数据 uc 覆盖X的 uc到原来的UC里 然后安装选择只安装X 用默认的UC

伪静态规则

Apache Web Server(独立主机用户) RewriteEngine On

RewriteRule ^(.*)/topic-(.+)\\.html$ $1/portal.php?mod=topic&topic=$2

RewriteRule ^(.*)/article-([0-9]+)\\.html$ $1/portal.php?mod=article&articleid=$2 RewriteRule

^(.*)/forum-(\\w+)-([0-9]+)\\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 RewriteRule

^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page\\=$4&page=$3

RewriteRule

^(.*)/group-([0-9]+)-([0-9]+)\\.html$ $1/forum.php?mod=group&fid=$2&page=$3

RewriteRule ^(.*)/space-(username|uid)-(.+)\\.html$ $1/home.php?mod=space&$2=$3 RewriteRule ^(.*)/([a-z]+)-(.+)\\.html$ $1/$2.php?rewrite=$3

Apache Web Server(虚拟主机用户) # 将 RewriteEngine 模式打开 RewriteEngine On

# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /

RewriteBase /discuz

# Rewrite 系统规则请勿修改

RewriteRule ^topic-(.+)\\.html$ portal.php?mod=topic&topic=$1

RewriteRule ^article-([0-9]+)\\.html$ portal.php?mod=article&articleid=$1

RewriteRule ^forum-(\\w+)-([0-9]+)\\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2 RewriteRule

^thread-([0-9]+)-([0-9]+)-([0-9]+)\\.html$ forum.php?mod=viewthread&tid=$1&extra=page\\=$3&page=$2

RewriteRule ^group-([0-9]+)-([0-9]+)\\.html$ forum.php?mod=group&fid=$1&page=$2 RewriteRule ^space-(username|uid)-(.+)\\.html$ home.php?mod=space&$1=$2 RewriteRule ^([a-z]+)-(.+)\\.html$ $1.php?rewrite=$2

IIS Web Server(独立主机用户) [ISAPI_Rewrite]

# 3600 = 1 hour

CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files # from accessing through HTTP

RewriteRule ^(.*)/topic-(.+)\\.html\\?*(.*)$ $1/portal\\.php\\?mod=topic&topic=$2&$3

RewriteRule ^(.*)/article-([0-9]+)\\.html\\?*(.*)$ $1/portal\\.php\\?mod=article&articleid=$2&$3 RewriteRule

^(.*)/forum-(\\w+)-([0-9]+)\\.html\\?*(.*)$ $1/forum\\.php\\?mod=forumdisplay&fid=$2&page=$3&$4

RewriteRule

^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\\.html\\?*(.*)$ $1/forum\\.php\\?mod=viewthread&tid=$2&extra=page\\=$4&page=$3&$5 RewriteRule

^(.*)/group-([0-9]+)-([0-9]+)\\.html\\?*(.*)$ $1/forum\\.php\\?mod=group&fid=$2&page=$3&$4 RewriteRule ^(.*)/space-(username|uid)-(.+)\\.html\\?*(.*)$ $1/home\\.php\\?mod=space&$2=$3&$4 RewriteRule ^(.*)/([a-z]+)-(.+)\\.html\\?*(.*)$ $1/$2\\.php\\?rewrite=$3&$4

Zeus Web Server

match URL into $ with ^(.*)/topic-(.+)\\.html\\?*(.*)$ if matched then

set URL = $1/portal.php?mod=topic&topic=$2&$3 endif

match URL into $ with ^(.*)/article-([0-9]+)\\.html\\?*(.*)$ if matched then

set URL = $1/portal.php?mod=article&articleid=$2&$3 endif

match URL into $ with ^(.*)/forum-(\\w+)-([0-9]+)\\.html\\?*(.*)$ if matched then

set URL = $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4 endif

match URL into $ with ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\\.html\\?*(.*)$ if matched then

set URL = $1/forum.php?mod=viewthread&tid=$2&extra=page\\=$4&page=$3&$5 endif

match URL into $ with ^(.*)/group-([0-9]+)-([0-9]+)\\.html\\?*(.*)$ if matched then

set URL = $1/forum.php?mod=group&fid=$2&page=$3&$4 endif

match URL into $ with ^(.*)/space-(username|uid)-(.+)\\.html\\?*(.*)$ if matched then

set URL = $1/home.php?mod=space&$2=$3&$4 endif

match URL into $ with ^(.*)/([a-z]+)-(.+)\\.html\\?*(.*)$ if matched then

set URL = $1/$2.php?rewrite=$3&$4 endif

Nginx Web Server

rewrite ^(.*)/topic-(.+)\\.html$ $1/portal.php?mod=topic&topic=$2 last;

rewrite ^(.*)/article-([0-9]+)\\.html$ $1/portal.php?mod=article&articleid=$2 last;

rewrite ^(.*)/forum-(\\w+)-([0-9]+)\\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; rewrite

^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page=$4&page=$3 last;

rewrite ^(.*)/group-([0-9]+)-([0-9]+)\\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last; rewrite ^(.*)/space-(username|uid)-(.+)\\.html$ $1/home.php?mod=space&$2=$3 last; rewrite ^(.*)/([a-z]+)-(.+)\\.html$ $1/$2.php?rewrite=$3 last;

权限更改

用户组权限 全部从新设置下