看板 PHP 關於我們 聯絡資訊
用網路上的範例跑不出來>"< 用火狐開顯示:無法顯示錯誤的圖片 用IE開則顯示一堆亂碼... 請問如何解決<(_ _)> 謝謝各位高手 -- 以下是GD資訊: array(11) { ["GD Version"]=> string(27) "bundled (2.0.28 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(false) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) } ?> 以下是範例 <html> <head> <title>GD</title> </head> <body> <? header ("Content-type: image/png"); $img_handle = ImageCreate (230, 20) or die ("Cannot Create image"); $back_color = ImageColorAllocate ($img_handle, 0, 10, 10); $txt_color = ImageColorAllocate ($img_handle, 233, 114, 191); ImageString ($img_handle, 31, 5, 5, "My first Program with GD", $txt_color); ImagePng ($img_handle); ?> </body> </html> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.123.237.138
ckmarkhsu:好歹也放個 img 標籤XD 可以將 echo 出來下載看看 05/04 22:23
uniXiang:終於找到了 07/25 10:45