找不到imagecreatefrompng

时间:2018-01-18 20:18:29

标签: php captcha

以下PHP代码无法正常工作;

<div style="text-align:center"><img src="scripts/captcha/index.php?<?php echo session_name()?>=<?php echo session_id()?>" style="vertical-align:middle" /> <input type="text" name="keystring"><br /><span class="fontsm">(word verification)</span></div><br />

进行CAPTCHA验证。它由GoDaddy主持。在旧服务器上,它工作。它已被转移到新服务器,但它无法正常工作。

PHP吐出以下HTML代码;

<img src="scripts/captcha/index.php?PHPSESSID=331f5041b67145685c5401104c602876" style="vertical-align:middle" />

因此,由于某种原因,IMG元素无法加载图像。

当我输入时;

http://c-compiler.com/scripts/captcha/index.php?PHPSESSID=331f5041b67145685c5401104c602876

进入MSIE,它说;

Fatal error: Uncaught Error: Call to undefined function
imagecreatefrompng() in
/home/ccompiler12/public_html/scripts/captcha/kcaptcha.php on line 49
( ! ) Error: Call to undefined function imagecreatefrompng() in
/home/ccompiler12/public_html/scripts/captcha/kcaptcha.php on line 49
Call Stack
#   Time    Memory  Function    Location
1   0.0000  354104  {main}( )   .../index.php:0
2   0.0002  355304  KCAPTCHA->KCAPTCHA( )   .../index.php:33

So it's not finding function imagecreatefrompng.

imagecreatefrompng的帮助页面位于;

http://php.net/manual/en/function.imagecreatefrompng.php

如何使此功能正常工作?似乎没有这个 特殊功能是问题。

已安装GD扩展程序。

Is imagecreatefrompng part of GD? If not, which extension are they part of?

0 个答案:

没有答案