论坛风格切换
  • 3244阅读
  • 1回复

[常见问题]论坛附件和圈子附件地址分离 [复制链接]

上一主题 下一主题
离线太史慈
 

发帖
766
金币
626
威望
556
只看楼主 倒序阅读 使用道具 楼主  发表于: 2011-06-22
apps.php
找到
require_once ('global.php');
下加
  1. $db_ftpweb_tmp = $db_ftpweb;
  2. $attach_url_tmp = $attach_url;
  3. $db_ftpweb='http://119.164.219.28/attachments';
  4. $attach_url ='';


Apps/diary/action/view.php
找到

$diary = $diaryService->getDiaryDbView($diaryTemp);下加
  1.     $db_ftpweb = $db_ftpweb_tmp;    $attach_url = $attach_url_tmp;

require/showimg.php找到$db_ftpweb统统改成$db_ftpweb2然后找到if ($db_ftpweb2 && !$fileExists) {上加$db_ftpweb2 = 'http://img3.iqilu.com/newbbs/attachments';
[url=http://www.phpwind.com]phpwind[/url]
离线太史慈

发帖
766
金币
626
威望
556
只看该作者 沙发  发表于: 2011-06-22
原先地址跳转
Index.php和u.php
找到
require_once ('global.php');
下加
  1. $uri = $_SERVER['REQUEST_URI'];
  2. if(strlen($uri)>10){
  3.     $uri = strtok($uri,'?');
  4.     $qs = strtok('?');
  5.     preg_match("/^uid-(\d+)-action-(.*)-itemid-(\d+)$/", $qs, $matches);
  6.     if($matches[2]=='viewspace'){
  7.         $newdid = $db->get_value("SELECT did FROM a_diary WHERE old_itemid=".$matches[3]);
  8.         header("HTTP/1.1 301 Moved Permanently");
  9.         header("Location: [url=http://bbs.iqilu.com/apps.php?q=diary&uid=]http://bbs.iqilu.com/apps.php?q=diary&uid=".$matches[1]."&a=detail&did=".$newdid[/url]);
  10.         exit;
  11.     }
  12. }


[url=http://www.phpwind.com]phpwind[/url]
快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
提到某人:
选择好友
上一个 下一个