GD库已经开启解决办法

WBOY
Release: 2016-06-13 12:02:31
Original
988 people have browsed it

GD库已经开启
linux,GD库已经开启,是yum install安装的
[[email protected] ~]# rpm -qa |grep php
php53u-pdo-5.3.28-5.ius.centos5
php53u-cli-5.3.28-5.ius.centos5
php53u-fpm-5.3.28-5.ius.centos5
php53u-xmlrpc-5.3.28-5.ius.centos5
php53u-gd-5.3.28-5.ius.centos5
php53u-common-5.3.28-5.ius.centos5
php53u-5.3.28-5.ius.centos5
php53u-xml-5.3.28-5.ius.centos5
php53u-mysql-5.3.28-5.ius.centos5

但是验证码还是不显示
------解决方案--------------------
验证码是图片,必须用 img 标记引用
验证码生成程序不能在 php 标记以外有任何输出,包括 BOM 头
验证码生成程序不能有 echo、print 等有文本输出的语句,当然也不能有任何错误
注释掉 header 语句,在浏览器中直接访问验证码生成程序,直到没有错误为止

------解决方案--------------------
1、php.ini 中设置下一下时区,或者用date_default_timezone_set()也可。
2、需要安装 php-mbstring库文件才能使用mb_系列函数。可用命令 $ sudo yum install php-mbstring  安装。

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