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

技术教程 2026-01-08 19:03:17 浏览

注:DedeCMS v5.7 sp1不需要以上操作,这一点官方已升级调整过了。 如果按照这篇文档里操作之后,验证码不显示,说明有一个地方,你还没有调整: 织梦dedecms站点<a href=Data目录位置变动调整验证码不显示的解决办法" src="https://www.kuidc.com/zdmsl_image/article/20260108190317_81946.jpg" loading="lazy"> 打开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/";

本文版权声明本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站客服,一经查实,本站将立刻删除。

发表评论

热门推荐