[問題]請問cpg中的cpg_redir.php怎麼改才對?

CPG Running Discuss
關於 CPG 架設使用操作討論,非本程式相關問題一律砍文!

版主: 版主管理群

回覆文章
閑人
星球公民
星球公民
文章: 114
註冊時間: 2004-02-24 22:50
來自: 閑人村

[問題]請問cpg中的cpg_redir.php怎麼改才對?

文章 閑人 »

jiachi兄發表的[轉貼]在CPG中登入及登出依然在CPG中...v1.3補充

中提到要在phpbb資料夾裡建立一個檔案 cpg_redir.php :
<?php
if (!$_SERVER['HTTP_HOST']) {
$cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
$cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>
很奇怪,雖然有英文說明,看起來也有點懂
但改了一百次還是不能\r
說明是:Important - before you save the file, you must ensure that:
$cpg_path - contains the the path in which Coppermine is installed
$cpg_host - contains the domain pointer to Coppermine. If Coppermine and phpBB are installed on the same server and domain (the "normal" case), you should leave the default value. Otherwise you should provide a string constant which contains the domain where Coppermine is installed (for example: 'www.my-other-domain.com').
If you change both variables make sure that either $cpg_host contains a trailing slash or $cpg_path contains a leading slash. In other words, the concatenation of the two variables must result in a correct path such as http://www.my-other-domain.com/my_gallery_dir

我的相本網址是http://140.112.89.212/cycloneye/gallery/index.php
而網站是http://140.112.89.212/cycloneye/index.php
很明顯是我把相本放到phpbb的目錄裡面去了
但要配合那段英文來改,怎麼改都不對
如:
<?php
if (!$_SERVER['HTTP_HOST']) {
$cpg_host='140.112.89.212'['HTTP_HOST'];
} else {
$cpg_host='140.112.89.212'['HTTP_HOST'];
}
$cpg_path='/cycloneye/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>
------------------------------
<?php
if (!$_SERVER['HTTP_HOST']) {
$cpg_host='140.112.89.212/cycloneye'['HTTP_HOST'];
} else {
$cpg_host='140.112.89.212/cycloneye'['HTTP_HOST'];
}
$cpg_path='/cycloneye/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>
--------------------------------------------------
<?php
if (!$_SERVER['HTTP_HOST']) {
$cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
$cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/cycloneye/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>

所以想問有裝成功的人,能不能po一下您是怎麼修改這段的
我看看照做,看是否能解決

感謝~

回覆文章

回到「Coppermine Photo Gallery」