


What should I do if the dedecms background login verification code is not displayed normally?
前言:
在登录dedecms后台时,经常遇到如下三种问题:
1、后台验证码不显示
2、后台验证码不正常显示
3、后台验证码不正常显示
解决方法:
1、取消后台验证码功能
因为没有验证码 不能进后台 所以修改php文件源代码:
方法一:
打开dede/login.php 找到如下代码
if(($validate=='' || $validate != $svali) && preg_match("/6/",$safe_gdopen)){ ResetVdValue(); ShowMsg('验证码不正确!','login.php',0,1000); exit; }
第一行替换为 if(false){
好 问题解决 不输验证码后台直接进去
(学习视频分享:php视频教程)
方法二:
打开data/safe/inc.safe.config.php
把代码$safe_gdopen = '1,2,3,4,5,6,7'; 中的6,删除即可
Dede后台验证码不显示情况一分析:
验证码需要GD库 请检查你的环境是否开启GD库
Dede后台验证码不显示情况二分析:
验证码只显示背景 不显示字母
打开验证码生成文件 Include/vdimgck.php
找到
for($i=0;$i<$rndcodelen;$i++) { $bc = mt_rand(0, 1); $rndstring[$i] = strtoupper($rndstring[$i]); $c_fontColor = $fontColor[mt_rand(0,4)]; $y_pos = $i==0 ? 4 : $i*($font_size+2); $c = mt_rand(0, 15); @imagettftext($im, $font_size, $c, $y_pos, 19, $c_fontColor, $font_file, $rndstring[$i]); $lastc = $rndstring[$i]; }
Imagettftext()函数没有成功的执行导致了验证码只显示背景,不显示字母
具体原因为 字体文件路径不对.解决方法
1、确认include/data/fonts/ 里面存在字体文件 默认为ggbi.ttf
2、在for($i=0;$i<$rndcodelen;$i++) 上一行 加上如下代码:
$font_file= str_replace("\\","/",$font_file);
即把字体文件路径中反斜杠替换成斜杠 因为我们知道反斜杠有转译字符的功能,
$font_file 路经大体为 盘符:\appserv\www 系统错误的把反斜杠 当作转义用了 导致$font_file也就不是一个路径了 所以Imagettftext()函数总是返回错误
加上$font_file= str_replace("\\","/",$font_file);即可解决
Dede后台验证码不显示情况三分析:
Include/data/words/words.txt 文件不存在
解决方案:
(1)拷贝一个进去
(2)找到代码 'word_type' => (int)$safe_codetype, // 1:数字 2:英文 3:单词
(3)换成'word_type' =>1 (或2) 既验证码为数字或英文
Dede后台验证码不显示 全部情况解决
如果原来可以显示后来取消验证码后再设置就无法显示,可以通过覆盖data与include目录试试。
相关推荐:织梦cms
The above is the detailed content of What should I do if the dedecms background login verification code is not displayed normally?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The solution to the Discuz background login problem is revealed. Specific code examples are needed. With the rapid development of the Internet, website construction has become more and more common, and Discuz, as a commonly used forum website building system, has been favored by many webmasters. However, precisely because of its powerful functions, sometimes we encounter some problems when using Discuz, such as background login problems. Today, we will reveal the solution to the Discuz background login problem and provide specific code examples. We hope to help those in need.

What should I do if Google Chrome does not display the verification code image? Sometimes you need a verification code to log in to a web page using Google Chrome. Some users find that Google Chrome cannot display the content of the image properly when using image verification codes. What should be done? The editor below will introduce how to deal with the Google Chrome verification code not being displayed. I hope it will be helpful to everyone! Method introduction: 1. Enter the software, click the "More" button in the upper right corner, and select "Settings" in the option list below to enter. 2. After entering the new interface, click the "Privacy Settings and Security" option on the left. 3. Then click "Website Settings" on the right

Are you worried about WordPress backend garbled code? Try these solutions, specific code examples are required. With the widespread application of WordPress in website construction, many users may encounter the problem of garbled code in the WordPress backend. This kind of problem will cause the background management interface to display garbled characters, causing great trouble to users. This article will introduce some common solutions to help users solve the trouble of garbled characters in the WordPress backend. Modify the wp-config.php file and open wp-config.

Title: Discuz background account login exception, how to deal with it? When you use the backend management of the Discuz forum system, you may sometimes encounter abnormal account login. This could be due to a variety of reasons, including a wrong password, account being blocked, network connection issues, etc. When encountering this situation, we need to solve the problem through simple troubleshooting and processing. Check whether the account number and password are correct: First, confirm whether the account number and password you entered are correct. When logging in, make sure the capitalization is correct and the password is

Youkazhong users need to use the verification code to register, so why can’t they receive the verification code to register? Users may not receive the verification code due to network problems, device problems, or server problems. This introduction to the registration problem of not receiving the verification code can tell you how to install it. The following is a detailed introduction, come and take a look! Why can't you receive the verification code for registration in Youka? Answers: Network problems, equipment problems, and server problems lead to detailed introduction: 1. Solution to network problems: Users need to check their own network and can try to change the network environment. If the network is weak, the verification code will fail to be sent. 2. Equipment problem: Solution: Check if there is any interfering software in your background. You can try restarting the device or reinstalling the software.

Empire CMS template download location: Official template download: https://www.phome.net/template/ Third-party template website: https://www.dedecms.com/diy/https://www.0978.com.cn /https://www.jiaocheng.com/Installation method: Download template Unzip template Upload template Select template

How to correctly use nohup for background task processing In daily work, we often need to perform some time-consuming tasks, such as file copying, data processing, etc. In order not to affect our work efficiency and ensure that tasks can run stably in the background, we can use the nohup command to start these tasks. This article will introduce how to correctly use nohup for background task processing. What is nohup command? nohup is a command in Unix and Unix-like operating systems that is used to run commands or scripts in the background.

"Discussion on the Impact of Discuz's Canceling the Verification Code Function on Website Security" With the rapid development of the Internet, website security issues have become increasingly prominent. As a common security verification mechanism, verification code is widely used on websites. However, some websites may cancel the verification code function in order to improve user experience. Will this have a negative impact on website security? This article will discuss the impact of Discuz's cancellation of verification code function on website security and provide specific code examples. 1. The function and principle of verification code Verification code (CAP)
