本帖最后由 badnewfish 于 2013-11-13 00:14 编辑
URL地址小写o变大写O的问题:
[url=]U[/url]
经过研究发现,存储在$_G中的字符串内的小写o都会被替换为大写O,解决这个问题的方法是:
$navtitle = str_replace('{bbname}', $_G['setting']['bbname'], $_G['setting']['seotitle']['forum']);
在根目录forum.php文件的尾部添加以下代码:
$_G['setting']['threadhidethreshold'] = 1;
$_G['buildBATopicList']=strtolower($_G['buildBATopicList']);
$_G['buildBAAdvertisementTop']=strtolower($_G['buildBAAdvertisementTop']);
$_G['buildBAAdvertisement']=strtolower($_G['buildBAAdvertisement']);
$_G['BAQQShow']=strtolower($_G['BAQQShow']);;
require DISCUZ_ROOT.'./source/module/forum/forum_'.$mod.'.php';
更新:上面的红色代码不够科学,因为目前只发现了大O替代了小o,所以都转换成小写是没有足够的理由的,但是经历这么多次的转码,网站的效率着实令人担忧啊,应该为下面的
$_G['setting']['threadhidethreshold'] = 1;
$_G['buildBATopicList']=str_replace("O","o",$_G['buildBATopicList']);
$_G['buildBAAdvertisementTop']=str_replace("O","o",$_G['buildBAAdvertisementTop']);
$_G['buildBAAdvertisement']=str_replace("O","o",$_G['buildBAAdvertisement']);
$_G['BAQQShow']=strtolower($_G['BAQQShow']);;
|