Home > CMS Tutorial > PHPCMS > How to cancel background login verification code in phpcms

How to cancel background login verification code in phpcms

藏色散人
Release: 2019-12-27 10:22:47
Original
3948 people have browsed it

How to cancel background login verification code in phpcms

How to cancel the background login verification code in phpcms?

Website background verification code has always been a function that comes with most open source programs to enhance background security. This function can prevent the background from being violently cracked by the program and other unsafe situations. But we all know that most verification codes are displayed in the form of pictures. If the background verification code is not displayed, it will cause the background to be unable to log in. No, the editor of Wuyou Host encountered that the background verification code of the phpcmsV9 program could not be displayed, and the verification codes were all red × signs. Since the customer was in a hurry and the editor had not yet found the source of the problem, we gave the customer a temporary solution to deal with the backend verification code not being displayed, which is known as the "One-size-fits-all" solution: cancel the backend verification code. The editor below will share with you how to cancel the background verification code of phpcmsV9.

The detailed setting steps are as follows:

Step one:

Follow the directory path to find the file phpcms\modules\admin\index.php

Place 33 Comment out the code at line 36

$code = isset($_POST[‘code’]) && trim($_POST[‘code’]) ?trim($_POST[‘code’]) : showmessage(L(‘input_code’), HTTP_REFERER);
if ($_SESSION[‘code’] != strtolower($code)) {
showmessage(L(‘code_error’), HTTP_REFERER);
}
Copy after login

Step 2:

Find the file phpcms\modules\admin\templates\login.tpl.php

according to the directory path Comment out the 38th to 39th line of code

Comment out the 38th line of code

<!–<label><?php echo L(‘security_code’)?>:</label><inputname=”code” type=”text” class=”ipt ipt_reg”onfocus=”document.getElementById(‘yzm’).style.display=’block&#39;”/>–>
Copy after login

Comment out the 39th line

<div id=”yzm” class=”yzm”><?php echoform::checkcode(‘code_img’)?><br /><ahref=”javascript:document.getElementById(‘code_img’).src=&#39;<?php echoSITE_PROTOCOL.SITE_URL.WEB_PATH;?>api.php?op=checkcode&m=admin&c=index&a=checkcode&time=’+Math.random();void(0);”><?phpecho L(‘click_change_validate’)?></a></div>
Copy after login

After commenting out the above code according to the above method, save it to the corresponding directory. When you log in to the backend of the website, you will no longer see the verification code. This method can temporarily solve the problem of being unable to log in to the background.

PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!

The above is the detailed content of How to cancel background login verification code in phpcms. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template