Home  >  Article  >  Backend Development  >  Analysis of the reasons and solutions why thinkPHP cannot display the verification code

Analysis of the reasons and solutions why thinkPHP cannot display the verification code

不言
不言Original
2018-05-04 13:56:131176browse

This article mainly introduces the reasons and solutions for thinkPHP not displaying the verification code, and analyzes the related configuration methods and precautions for thinkPHP regarding the verification code display. Friends in need can refer to the examples of this article

Describes the reasons and solutions why thinkPHP cannot display the verification code. I share it with you for your reference. The details are as follows:

I went to the company today and after svn updated the code and entered the domain name in the browser, the verification code was not displayed. I searched for half a morning and then carefully I looked at the apache configuration file

<VirtualHost *:80>
    ServerName admin.exam.com
    DocumentRoot E:/www/exam/trunk/server/Admin/
    <Directory E:/www/exam/trunk/server/apps/Admin/>
        Options FollowSymLinks
        AllowOverride all
        Order deny,allow
        allow from all
        Satisfy all
    </Directory>
</VirtualHost>

It turns out that DocumentRoot and Directory are inconsistent

<VirtualHost *:80>
    ServerName admin.exam.com
    DocumentRoot E:/www/exam/trunk/server/Admin/
    <Directory E:/www/exam/trunk/server/Admin/>
        Options FollowSymLinks
        AllowOverride all
        Order deny,allow
        allow from all
        Satisfy all
    </Directory>
</VirtualHost>

It should be that when adding the backend, I copied a module in the configuration file. I was careless.

In addition:

A colleague encountered a similar problem today. I thought it could be solved by using the above method, but it didn’t work after trying it. With a really pragmatic attitude, I took a look at the source file that generated the verification code, and finally discovered that it turned out that the crystal.ttf font file was not displayed. No wonder it only displayed one line. Move the font file to the location of the source file. The directory will be ok.

Related recommendations:

thinkPHP implemented verification code login function


##

The above is the detailed content of Analysis of the reasons and solutions why thinkPHP cannot display the verification code. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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