Discuz教程网

[代码修改] Discuz X2 RC SEO设置不支持空格解决方案

[复制链接]
authicon dly 发表于 2011-5-15 17:26:02 | 显示全部楼层 |阅读模式
修改文件:source/function/function_core.php 2506 行附近         修改之前请备份好原文件~!

查找:
  1. function strreplace_strip_split($searchs, $replaces, $str) {
  2. $searchspace = array('((\s*\-\s*)+)', '((\s*\,\s*)+)', '((\s*\|\s*)+)', '((\s*\t\s*)+)', '((\s*_\s*)+)');
  3. $replacespace = array('-', ',', '|', ' ', '_');
  4. return trim(preg_replace($searchspace, $replacespace, str_replace($searchs, $replaces, $str)), ' ,-|_');
复制代码
替换为:
  1. function strreplace_strip_split($searchs, $replaces, $str) {
  2. $searchspace = array('(((\s)*\-(\s)*)+)', '(((\s)*\,(\s)*)+)', '(((\s)*\|(\s)*)+)', '(((\s)*\t(\s)*)+)', '(((\s)*_(\s)*)+)');
  3. $replacespace = array('$3-$3', '$3,$3', '$3|$3', '$3 $3', '$3_$3');
  4. return trim(preg_replace($searchspace, $replacespace, str_replace($searchs, $replaces, $str)), ' ,-|_');
  5. }
复制代码
后台更新缓存~!








上一篇:Discuz X2 后台附件管理搜索时候的报错的处理
下一篇:Discuz X2图片本地化后出现\n,临时解决方案
authicon cutiemimi 发表于 2011-5-15 19:29:42 | 显示全部楼层
这个还是不错的!
authicon 蓝天blue 发表于 2011-5-15 20:30:03 | 显示全部楼层
继续来索要
authicon TRACYFLYING 发表于 2011-5-15 22:29:42 | 显示全部楼层
我回不回呢 考虑再三 还是不回了吧 ^_^
authicon qqoxygen 发表于 2011-5-15 23:29:45 | 显示全部楼层
谢谢,学习了
authicon TRACYFLYING 发表于 2011-5-16 03:30:08 | 显示全部楼层
不错不错,我喜欢
authicon nmzc 发表于 2011-5-16 04:29:35 | 显示全部楼层
楼主威武
authicon melody0721 发表于 2011-5-16 05:29:42 | 显示全部楼层
有意思~顶顶 ,继续顶顶。继续顶哦
authicon qqoxygen 发表于 2011-5-16 06:29:45 | 显示全部楼层
前来看看那
authicon 福倒菜菜子 发表于 2011-5-16 16:29:35 | 显示全部楼层
顶的就是你
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-2 12:28

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表