How to solve the problem that the php linux verification code does not display

藏色散人
Release: 2023-03-03 08:28:01
Original
2888 people have browsed it

php linux验证码不显示的解决办法:首先定义验证码中要用到的颜色;然后通过“imagefilledrectangle”等函数画出背景边框等;接着画验证码;最后在linux中把对应的字体放到上级目录中即可。

How to solve the problem that the php linux verification code does not display

推荐:《PHP教程

php 验证码linux下只显示画布,不显示验证码的终极解决方法

经测试通过,首先放出我的代码

Copy after login

复制下载后注意41和43行,如果服务器是windows那么请把43行注释掉,保留41行,linux则反过来

linux下注意下要把对应的字体放到上级目录里,如我用的是微软雅黑。别的方法俺也不会反正最终是显示出来了。赶快试试吧

The above is the detailed content of How to solve the problem that the php linux verification code does not display. 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!