对,要先将php.ini中的bg2.dll这个前的去掉啊

解决方案 »

  1.   

    新版本的gd不支持gif。用png吧
      

  2.   

    <?PHP
    header("Content-type: image/gif");
            $image=imagecreate(200,200);
            $maroon=imagecolorallocate($image,100,0,0);
            $white=imagecolorallocate($image,255,255,255);
            imagefilledrectangle($image,0,0,200,200,$white);
            imagerectangle($image,10,10,190,190,$maroon);
            imagefilledrectangle($image,50,50,150,150,$maroon);
            imagejpeg($image);
            imagedestroy($image); ?>imagegif($image);要用到最新的gd库,要生成gif请下载最新的gd库,用imagejpeg($image);代替旧可以了
    php.ini中去掉;extension=php_gd2.dll前面的分号
      

  3.   

    如下面代码
    <HTML>
    <HEAD></HEAD>
    <BODY>
    <?PHP header("Content-type: image/gif");
    $image=imagecreate(200,200);
            $maroon=imagecolorallocate($image,100,0,0);
            $white=imagecolorallocate($image,255,255,255);
            imagefilledrectangle($image,0,0,200,200,$white);
            imagerectangle($image,10,10,190,190,$maroon);
            imagefilledrectangle($image,50,50,150,150,$maroon);
            imagejpeg($image);
            imagedestroy($image);?>
    </BODY>
    </HTML>
    可输出结果都为一大堆的乱七八糟代码晕怎么解决!
    再等几分钟就结贴!
      

  4.   

    .....把HTML代码去掉啊!!!
    这样
    <?PHP header("Content-type: image/gif");
    $image=imagecreate(200,200);
            $maroon=imagecolorallocate($image,100,0,0);
            $white=imagecolorallocate($image,255,255,255);
            imagefilledrectangle($image,0,0,200,200,$white);
            imagerectangle($image,10,10,190,190,$maroon);
            imagefilledrectangle($image,50,50,150,150,$maroon);
            imagejpeg($image);
            imagedestroy($image);?>
      

  5.   

    to surfchen :
    我知道那样可以,
    可是我想在一个<HTML>里的表<TABLE>中画一个动态的图这样,,我能控制页面的布局,如果加在页头,我不知道怎么控制页面的布局拉!
    帮忙解决一下谢过先!
      

  6.   

    画图的程序要单独在一个页面里面,不能和其他的程序混在一起的-------------aaaa.php----------
    <?PHP
    header("Content-type: image/gif");
            $image=imagecreate(200,200);
            $maroon=imagecolorallocate($image,100,0,0);
            $white=imagecolorallocate($image,255,255,255);
            imagefilledrectangle($image,0,0,200,200,$white);
            imagerectangle($image,10,10,190,190,$maroon);
            imagefilledrectangle($image,50,50,150,150,$maroon);
            imagejpeg($image);
            imagedestroy($image); ?>--------------index.html----------------------------
    下面是图片
    <image src=aaaa.php>
    上面是图片
    <hr>
    你运行index.html是不是看到图片了
      

  7.   

    to  hahawen(变态的大龄青年) 
    有经验就是有经验一语道破,入木三分呀!