PHP验证码图片未在Chrome中显示 [英] PHP Captcha image not displaying in chrome

查看:121
本文介绍了PHP验证码图片未在Chrome中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用PHP创建验证码图片。它显示了加载时的验证码。完成加载后,它不会在Chrome中显示验证码图片。在其他浏览器中,它运行良好。为什么?

I use PHP for creating a captcha image. It is showing the captcha at the time of loading. After completing the loading, it doesn't show the captcha image in Chrome. In other browsers, it is working fine. Why?

<?php
// Create an image from button.png
$image = imagecreatefrompng('button.png');

// Set the font colour
$colour = imagecolorallocate($image, 255, 120, 4);

// Set the font
$font = '../fonts/Anorexia.ttf';

// Set a random integer for the rotation between -15 and 15 degrees
$rotate = rand(-15, 15);

// Create an image using our original image and adding the detail
imagettftext($image, 18, $rotate, 18, 30, $colour, $font, $str);

// Output the image as a png
imagepng($image);

?>


推荐答案

也有同样的问题。.
一种可能原因是反横幅广告/杀毒软件。.
i正在使用Karpersky ..当我关闭卡巴斯基验证码显示没问题时,
从Chrome有点奇怪。.我认为他们应该寻找这个问题

having same problem.. One possible reason is anti-banner/ antivirus.. i am using Karpersky.. when i turned off kaspersky captcha showing ok, little bit strange from Chrome.. I think they should look for this problem

这篇关于PHP验证码图片未在Chrome中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆