Home  >  Article  >  Backend Development  >  PHP 验证码显示破图 是怎么回事?

PHP 验证码显示破图 是怎么回事?

WBOY
WBOYOriginal
2016-06-06 20:37:181341browse

phpcms 没有错误和警告
gd没有问题,用简单的代码可以输出图片
这要怎么判定这个问题的所在?

回复内容:

phpcms 没有错误和警告
gd没有问题,用简单的代码可以输出图片
这要怎么判定这个问题的所在?

问题已经解决了,phpcms 在有gz的时候,ob开启了gz,ob_start('ob_gzhandler')
直接启动ob_start() 图片就显示正常。
不过这个问题 很奇怪,代码没有做过修改,我的猜测是,在某种情况下IIS+php的其中某个环节出现问题,
因为是windows 服务器,不好debug,也就不做深入的debug了
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
这里似乎有更专业的解释
http://php.net/manual/zh/function.ob-gzhandler.php#76845
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
但是这仍然无法解释,在没有任何代码修改的情况下,为什么验证码突然就出现了破图,且不能自行恢复

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