本帖最后由 csfinal9 于 2012-07-06 16:12:23 编辑

解决方案 »

  1.   

    去掉header,看看浏览器会报出哪些的错误。
      

  2.   

    去掉之后出来乱码了
    塒NG  IHDR�8稼�PLTEベ熭}IDAT8峜`��@�凖�$�瑓M偳�慫x`Z堉脉徵�;a炠{�泑�⒌3鸲诼@糭�挰厵T[貙檈��2Q€Q鶚耥�D{圲I墫 *鍹0SQIEND瓸`
    如上所示
      

  3.   

    php.ini中打开错误提示 display_errors=On
    error_reporting=E_ALL & ~E_NOTICE 重启iis 
    把header注释掉。再测试是什么情况。
      

  4.   

    开启错误吧,正如老大说的,应该是bom头的问题,但是你却没有开启错误提示
      

  5.   


    <?php 
    Header("Content-type: image/x-png");
    $im = imagecreate(400,30);
    $black = imagecolorallocate($im, 0,0,0);
    $white = imagecolorallocate($im, 255,255,255);
    imageline($im, 1, 1, 350, 25, $black);
    imagearc($im, 200, 15, 20, 20, 35, 190, $black);
    imagestring($im, 5, 4, 10, "Graph TEST!!", $white);
    imagepng($im);
    imageDestroy($im);
    ?>