把你PHP目录下的ext文件夹里的php_gd2.dll复制到系统目录下,然后修改你的PHP.ini文件,找到以下位置
;extension=php_gd2.dll
把前面的;去掉....
重启你的网页服务器apache或者IIS就可以了
测试:
<?php
if(extension_loaded('gd')) {
echo 'gd can use<br>';
foreach(gd_info() as $cate=>$value)
echo "$cate: $value<br>";
}else
echo 'have not install gd ext';
?>
如果成功:
gd can use
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support: 1
JIS-mapped Japanese Font Support: