<?php// this example is provided by poxy at klam dot// create image
$image = imagecreate(100, 100);// allocate some solors
$white    = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
$gray     = imagecolorallocate($image, 0xC0, 0xC0, 0xC0);
$darkgray = imagecolorallocate($image, 0x90, 0x90, 0x90);
$navy     = imagecolorallocate($image, 0x00, 0x00, 0x80);
$darknavy = imagecolorallocate($image, 0x00, 0x00, 0x50);
$red      = imagecolorallocate($image, 0xFF, 0x00, 0x00);
$darkred  = imagecolorallocate($image, 0x90, 0x00, 0x00);// make the 3D effect
for ($i = 60; $i > 50; $i--) {
  imagefilledarc($image, 50, $i, 100, 50, 0, 45, $darknavy, IMG_ARC_PIE);
  imagefilledarc($image, 50, $i, 100, 50, 45, 75 , $darkgray, IMG_ARC_PIE);
  imagefilledarc($image, 50, $i, 100, 50, 75, 360 , $darkred, IMG_ARC_PIE);
}imagefilledarc($image, 50, 50, 100, 50, 0, 45, $navy, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 45, 75 , $gray, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 75, 360 , $red, IMG_ARC_PIE);
// flush image
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?> 
比如这个程序,除了gd库,还要什么其他的东西?
我现在放在服务器上就显示不出来了。

解决方案 »

  1.   

    唉,我自己搞都不用这样啦。我直接用phptriad那些傻瓜安装包,所以到现在自己都不会配置服务器。是我的空间服务商,他们换了一个服务器,很多配置和以前不一样,库应该是没了。所以显示不正常。我所以需要问问需要装什么库基本上,然后告诉人家,好让他们配置好。配置过高级服务器的达人们,说说。
      

  2.   

    装个xampp,linux版除了iconv没有,基本比较全了。
      

  3.   

    不是。操作系统是freebsd的。
    服务器只装了一个gd库,显示不出我的图片来。莫非需要装的是gd2?
      

  4.   


    get_defined_functions()
    读取所有可用函数或用
    get_extension_funcs("扩展库名")
    检查你需要的扩展库是否加载,及该扩展库的函数是否与你需要的相同可尝试用dl函数加在你需要的扩展库
      

  5.   

    奇怪,get_defined_functions()是个array,但是我count以后循环居然写不出来。
      

  6.   

    print_r(get_extension_funcs("mbstring"));
    没有显示。说明没有装此模块是吧?
      

  7.   

    干吗用count+循环,用print_r或者var_dump多好。我也不知道一般都需要哪些函数库,所以我的服务器上装了很多,现在服务器上用户不多,所以暂时没考虑安全问题。
    我装了gd2,iconv,ldap,zlib,其他的用到再说,你可以看看手册上需要用的函数是否需要扩展库支持再考虑装哪些库。呵呵,前几天装的iconv很好用。
    还有很多功能是不需要扩展库支持的,但要是编译的时候不enable一下也用不了,具体的查一查configure --help。