Gd扩展用于动态创建图片,是一个非常优秀的图片处理扩展库,在安装了appserv后,大家都这样说打开php的配置文件php.ini 找到extension=php_gd2.dll 把它前面的分分号去掉即可,但是我试了这样是行不通的,用phpinfo()是不会显示gd库的。

gd

GD Support enabled
GD Version bundled (2.0.34 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
这个表格是显示不出来的。
if(!   function_exists("p_w_picpathcreat"))  
      echo   "
没有安装 GD 支持 ";  
  else  
      if(!   function_exists("p_w_picpathcreattruecolor"))  
          echo   "
安装的是 GD2";  
 
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

用这段程序它会出现的结果是:没有安装gd支持。
有的说是把php安装包下的ext中的php_gd2.dll拷贝到c:\windows\system
目录下这样我的也不行。最后我发现了问题是:
用函数     phpinfo()
< ? php
phpinfo ();
?>
会显示的

PHP Version 5.2.0


System Windows NT D-32 5.1 build 2600
Build Date Nov 2 2006 11:50:55
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\Program Files\Zend\ZendStudio\bin\php5\php.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, data, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp
Registered Stream Filters convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*

中的路径C:\Program Files\Zend\ZendStudio\bin\php5\php.ini 你打开这个文件你会发现里面根本没有php_gd2.dll 这时只需要把php中的ext下的php_gd2.dll拷贝到这里即可,同时还要配置这里的php.ini文件加上php_gd2.dll.。重新启动下apache即可