Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that the verification code is not displayed due to the low version of php

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "how to solve the problem that the verification code is not displayed due to the low version of php". The content in the article is simple and clear, and it is easy to learn and understand. Please follow Xiaobian's train of thought to study and learn "how to solve the problem that the verification code is not displayed due to the low version of php".

1. The dependencies required to install php5-gd.

2. Create a clean.php file in the project root directory.

3. Clear bom.

After trying numerous search keywords, "php5 installed gd without CAPTCHA" finally found a post in which the clean.php header was mentioned. This is clear, because this BOM header will also occur when editing some files using the crt remote login server, so create a clean.php file in the project root directory.

Paste the following code

/ * clear bom*/if (isset ($_ GET ['dir'])) {$basedir=$_GET [' dir'];} else {$basedir='.';} $auto = 1 see checkdir ($basedir) Function checkdir ($basedir) {if ($dh = opendir ($basedir)) {while (($file = readdir ($dh))! = false) {if ($file! ='. & $file! ='..) {if (! is_dir ($basedir. "/". $file)) {echo "filename: $basedir/$file" .checkBOM ("$basedir/$file");} else {$dirname = $basedir. "/". $file;checkdir ($dirname);}} / end whileclosedir ($dh) } / / end if ($dh} / / end functionfunction checkBOM ($filename) {global $auto;$contents = file_get_contents ($filename); $charset [1] = substr ($contents, 0,1); $charset [2] = substr ($contents, 1,1); $charset [3] = substr ($contents, 2,1); if (ord ($charset [1]) = = 239 & & ord ($charset [2]) = 187 & & ord ($charset [3]) = 191) {if ($auto = 1) {$rest = substr ($contents, 3); rewrite ($filename, $rest) Return "BOM found, automatically removed.";} else {return ("BOM found.");}} else return ("BOM Not Found.");} / / end functionfunction rewrite ($filename, $data) {$filenum = fopen ($filename, "w"); flock ($filenum, LOCK_EX); fwrite ($filenum, $data); fclose ($filenum);}? >

Direct browser access to https://url/clean.php

If there is a problem, you will see a lot of such logs, and then revisit the CAPTCHA page and visit it normally.

Thank you for your reading, the above is the content of "how to solve the problem that the verification code is not displayed due to the low version of php". After the study of this article, I believe you have a deeper understanding of how to solve the problem that the low version of php leads to the problem that the verification code is not displayed. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report