刚学验证码制作:
[错误:Fatal error: Call to undefined function imagecreate() in D:\apache\htdocs\Test\vCode.php on line 9
]
我已在D:\php\php.ini文件里去掉了extension=php_gd2.dll的分号,且重启了apache。可为什么还是提示调用末定义的函数呢。
去掉imagecreat()函数,其它GD函数也是报相同的错误。
在d:apache\htdocs\Test
Test工程下有一文件:vCode.php
<?php
/*
* Created on 2009-7-29
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
$randNum=dechex(rand(1,15));
$img=imagecreate(100,30);
$bgColor=imagecolorallocate($img,0,0,0);
$textColor=imagecolorallocate($img,255,255,255);
imagestring($img,0,10,5,$randNum,$textColor);
header('content-type:image/jpeg');
imagejpeg($img);
?>
[错误:Fatal error: Call to undefined function imagecreate() in D:\apache\htdocs\Test\vCode.php on line 9
]
我已在D:\php\php.ini文件里去掉了extension=php_gd2.dll的分号,且重启了apache。可为什么还是提示调用末定义的函数呢。
去掉imagecreat()函数,其它GD函数也是报相同的错误。
在d:apache\htdocs\Test
Test工程下有一文件:vCode.php
<?php
/*
* Created on 2009-7-29
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
$randNum=dechex(rand(1,15));
$img=imagecreate(100,30);
$bgColor=imagecolorallocate($img,0,0,0);
$textColor=imagecolorallocate($img,255,255,255);
imagestring($img,0,10,5,$randNum,$textColor);
header('content-type:image/jpeg');
imagejpeg($img);
?>
请问除了在php.ini文件里去掉extension=php_gd2.dll前的;号,
还需要注意些什么?才能正确开启gd库?
只有修改phpinfo()打印出来的 load的 php.ini才有效果
相关的dll没有被找到