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  =====================phpinfo的GD信息
System  Windows NT CH-PC-043 5.2 build 3790
Build Date  Apr 30 2008 16:18:05
Configure Command  cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API  Apache 2.0 Handler
Virtual Directory Support  enabled
Configuration File (php.ini) Path  C:\WINDOWS
Loaded Configuration File  D:\Program Files\PHPnow2\php-5.2.6-Win32\php-apache2handler.ini
PHP API  20041225
PHP Extension  20060613
Zend Extension  220060519
Debug Build  no
Thread Safety  enabled
Zend Memory Manager  enabled
IPv6 Support  disabled
Registered PHP Streams  php, file, data, http, ftp, compress.zlib, zip
Registered Stream Socket Transports  tcp, udp
Registered Stream Filters  convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.* 
=====================服务器信息<?
gd_version();
?>
错误信息:Fatal error: Call to undefined function gd_version()

解决方案 »

  1.   

    用gd_info()试试<?php
    var_dump(gd_info());
    ?> 
      

  2.   

    <?
    gd_version();
    ?> 为什么这样不行嘞?
      

  3.   

    We also can read the constant GD_VERSION since PHP 5.2.4
      

  4.   

    <? 
    etimagesize();
    ?>etimagesize怎么调用? 
      

  5.   

    php里没有这个函数,当然不可以啦。。
    getimagesize的用法,手册上讲的比较清楚了:
    http://cn2.php.net/manual/en/function.getimagesize.php
      

  6.   


    <?
    $size =imageCopyMerge('test.jpg', 'waterForImg.gif', 52, 52, 0, 0, 32, 30, 80);
    print_r($size);
    ?>
    Warning: imagecopymerge(): supplied argument is not a valid Image resource in F:\WWWROOT\www_test_com\x.php on line 1这样可用了, 但测试有问题, test.jpg,waterForImg.gif都在www_test_com根目录下
      

  7.   

    $a = imagecreatefromgif ( 'test.jpg' );
    $b = imagecreatefromgif ( 'waterForImg.gif' );$size =imageCopyMerge($a, $b, 52, 52, 0, 0, 32, 30, 80);
    print_r($size);
      

  8.   


    Warning: imagecreatefromgif() [function.imagecreatefromgif]: 'test.jpg' is not a valid GIF file in F:\WWWROOT\www_test_com\x.php on line 13Warning: imagecopymerge(): supplied argument is not a valid Image resource in F:\WWWROOT\www_test_com\x.php on line 15===================================================
    附:gd_info()

    array(12) { ["GD Version"]=> string(27) "bundled (2.0.34 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(true) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) } 
      

  9.   


    $a = imagecreatefromjpeg( 'test.jpg' ); 
    $b = imagecreatefromgif ( 'waterForImg.gif' ); 
    $size =imageCopyMerge($a, $b, 52, 52, 0, 0, 32, 30, 80);
    print_r($size);
      

  10.   

    php.ini中extension=php_gd2.dll前的注释取消,重启WEB服务器