你没有配置好gd库,建议去google搜一下或到faq找一下相关文章

解决方案 »

  1.   

    能接触到服务器上的PHP.INI吗?把extension=php_gd.dll前的分号去掉。
      

  2.   

    不是不是很蝗白,怎么看能不能接触到服务器的PHP.INI啊
      

  3.   

    这该怎么说?我原来也碰见过这情况,配置PHP不是要配PHP.INI吗,我的意思是说你要改那个文件,前面还有一个好象是extension_dir要加上php_gd.dll所在的目录路径。
      

  4.   

    GD没配置好,先把PHP.INI中得extension=php_gd.dll前面得分号去掉试试
      

  5.   

    程序是这样的<?php
    $picwidth=360*2;
    $pichight=200;
    $pic=ImageCreate($picwidth+1,$picheight+1);
    $cwhite=ImageColorAllocate($pic,255,255,255);
    ImageFilledRectangle($pic,0,0,$picwidth+1,$picheight+1,$cwhite);
    $cred=ImageColorAllocate($pic,255,0,0);
    $cblue=ImageColorAllocate($pic,0,255,0);
    $curx=0;
    $cury=$picheight;
    for($pt=0; $pt<$picwidth; $pt++) {
    $newx=$curx+1;
    $newy=($picheight/2)+(cos(deg2rad($newx))*($picheight/2));
    ImageLine($pic,$curx,$cury,$newx,$newy,$cred);
    $curx=$newx;
    $cury=$newy;
    }
    $curx=0;
    $cury=$picheight/2;
    for($pt=0; $pt<$picwidth; $pt++) {
    $newx=$curx+1;
    $newy=($picheight/2)+(sin(deg2rad($newx))*($picheight/2));
    ImageLine($pic,$curx,$cury,$newx,$newy,$cblue);
    $curx=$newx;
    $cury=$newy;
    }
    $cblack=ImageColorAllocate($pic,0,0,0);
    ImageLine($pic,0,0,0,$picheight,$cblack);
    ImageLine($pic,0,$picheight/2,$picwidth,$picheight/2,$cblack);
    ImagePNG($pic,"./pngs/graph.png");
    ImageDestroy($pic);
    ?>
      

  6.   

    在PHP.INI中没找到extension=php_gd.dll?把它前面的分号去掉。然后要在extension_dir = 后加上文件php_gd.dll所在的目录路径。