저는 최근 Win 7 컴퓨터에 PHP를 다시 설치했습니다. 그렇게하면서 PHP 4에서 PHP 5.1.4로 업그레이드했습니다. GD 기능은 더 이상 작동하지 않습니다. php.ini 파일에서 php_gd2.dll 행의 주석 처리를 제거했습니다 :PHP 5.1.4에서 GD를 활성화하려면 어떻게해야합니까?
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll <-- This line was originally commented
;extension=php_gettext.dll
;extension=php_ifx.dll
그러나 문제가 해결되지 않았습니다.
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
이 myimage.htm입니다 :
<IMG SRC="myiamge.php" BORDER="1">
을 그리고 이것은 myimage.php입니다 :은 phpinfo()이이 GD에 대해 말한다
내가 myimage을 나의 브라우저를<?php
$my_img = imagecreate(200, 80);
$background = imagecolorallocate($my_img, 0, 0, 255);
$text_color = imagecolorallocate($my_img, 255, 255, 0);
$line_color = imagecolorallocate($my_img, 128, 255, 0);
imagestring($my_img, 4, 30, 25, "test", $text_color);
imagesetthickness ($my_img, 5);
imageline($my_img, 30, 45, 165, 45, $line_color);
header("Content-type: image/png");
imagepng($my_img);
imagecolordeallocate($line_color);
imagecolordeallocate($text_color);
imagecolordeallocate($background);
imagedestroy($my_img);
?>
. htm, 깨진 이미지의 아이콘을 봅니다. 내가 도대체 뭘 잘못하고있는 겁니까? 나는 멍청이야. 친절하게 대해.
myimage.php에 어떤 오류가 기록 되었습니까? –
5.1.4? 정말? 조금 더 업그레이드하십시오 :-) –