Discuz! X config_global.php配置注释教程<?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'] = ''; //二级域名根域名,例如: $_config['home']['holddomain'] = 'www,space,home,forum,portal'; //保留的二级域名,多个之间使用逗号",”分开?>首页资讯不显示建议升级浏览器然后div 添加数据uc 覆盖X的uc到原来的UC里然后安装选择只安装X 用默认的UC伪静态规则Apache Web Server(独立主机用户)<IfModule mod_rewrite.c>RewriteEngine OnRewriteRule ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2RewriteRule ^(.*)/article-([0-9]+)\.html$ $1/portal.php?mod=article&articleid=$2RewriteRule^(.*)/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=pag e\=$4&page=$3RewriteRule^(.*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3RewriteRule ^(.*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3</IfModule>Apache Web Server(虚拟主机用户)# 将RewriteEngine 模式打开RewriteEngine On# 修改以下语句中的/discuz 为你的论坛目录地址,如果程序放在根目录中,请将/discuz 修改为/RewriteBase /discuz# Rewrite 系统规则请勿修改RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1RewriteRule ^article-([0-9]+)\.html$ portal.php?mod=article&articleid=$1RewriteRule ^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=$2RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2 RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2RewriteRule ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2IIS Web Server(独立主机用户)[ISAPI_Rewrite]# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files# from accessing through HTTPRewriteRule ^(.*)/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& $4RewriteRule^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&ex tra=page\=$4&page=$3&$5RewriteRule^(.*)/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&$4Zeus Web Servermatch URL into $ with ^(.*)/topic-(.+)\.html\?*(.*)$if matched thenset URL = $1/portal.php?mod=topic&topic=$2&$3endifmatch URL into $ with ^(.*)/article-([0-9]+)\.html\?*(.*)$if matched thenset URL = $1/portal.php?mod=article&articleid=$2&$3endifmatch URL into $ with ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$if matched thenset URL = $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4endifmatch URL into $ with ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$if matched thenset URL = $1/forum.php?mod=viewthread&tid=$2&extra=page\=$4&page=$3&$5 endifmatch URL into $ with ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$if matched thenset URL = $1/forum.php?mod=group&fid=$2&page=$3&$4endifmatch URL into $ with ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$if matched thenset URL = $1/home.php?mod=space&$2=$3&$4endifmatch URL into $ with ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$if matched thenset URL = $1/$2.php?rewrite=$3&$4endifNginx Web Serverrewrite ^(.*)/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=pag e=$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;权限更改用户组权限全部从新设置下。