查看: 30|回覆: 0

[教程] 织梦dedecms站点data目录位置变动调整验证码不显示的解决办法

[複製鏈接]

4

主題

0

回帖

0

積分

热心网友

金币
0
閲讀權限
220
精華
0
威望
0
贡献
0
在線時間
0 小時
註冊時間
2010-9-26
發表於 2023-8-24 00:00:00 | 顯示全部樓層 |閲讀模式

注:DedeCMS v5.7 sp1不需要以上操作,这一点官方已升级调整过了。 
如果按照这篇文档里操作之后,验证码不显示,说明有一个地方,你还没有调整: 
打开include下的vdimgck.php, 找到如下代码: 

复制代码

代码如下:


require_once (dirname(__FILE__).'/../data/safe/inc_safe_config.php'); 
require_once (dirname(__FILE__).'/../data/config.cache.inc.php'); 
$config = array( 
'font_size' => 14, 
'img_height' => $safe_wheight, 
'word_type' => (int)$safe_codetype, // 1:数字 2:英文 3:单词 
'img_width' => $safe_wwidth, 
'use_boder' => TRUE, 
'font_file' => dirname(__FILE__).'/data/fonts/ggbi.ttf', 
'wordlist_file' => dirname(__FILE__).'/data/words/words.txt', 
'filter_type' => 5); 
$sessSavePath = dirname(__FILE__)."/../data/sessions/"; 



将上面代码中的data路径做相应的调整,比如上面3步操作是将data移到根目录的上一级目录,我们这里对data的路径加一个“/..”,改后如下: 

复制代码

代码如下:


require_once (dirname(__FILE__).'/../../data/safe/inc_safe_config.php'); 
require_once (dirname(__FILE__).'/../../data/config.cache.inc.php'); 
$config = array( 
'font_size' => 14, 
'img_height' => $safe_wheight, 
'word_type' => (int)$safe_codetype, // 1:数字 2:英文 3:单词 
'img_width' => $safe_wwidth, 
'use_boder' => TRUE, 
'font_file' => dirname(__FILE__).'/data/fonts/ggbi.ttf', 
'wordlist_file' => dirname(__FILE__).'/data/words/words.txt', 
'filter_type' => 5); 
$sessSavePath = dirname(__FILE__)."/../../data/sessions/"; 


好了,这样就可以了。

回覆

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即注册

本版積分規則

相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部