[請益] GD繪圖

看板PHP作者 (uNielsa)時間19年前 (2006/05/04 20:14), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/3 (看更多)
用網路上的範例跑不出來>"< 用火狐開顯示:無法顯示錯誤的圖片 用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

05/04 22:23, , 1F
好歹也放個 img 標籤XD 可以將 echo 出來下載看看
05/04 22:23, 1F

07/25 10:45, , 2F
終於找到了
07/25 10:45, 2F
文章代碼(AID): #14MV0X5E (PHP)
討論串 (同標題文章)
文章代碼(AID): #14MV0X5E (PHP)