织梦(dedecms)转移data目录后验证码无法显示的解决办法

上一篇文章中把data目录转移之后,发现验证码不显示的问题,下面就来说一下解决方法吧。

也许你还有这个东西没有调整到位 可以参考一下:

打开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/";

好了,这样就可以了。

posted @ 2019-08-30 10:45  紫云传芳  阅读(229)  评论(0)    收藏  举报