Re: [請益] GD繪圖

看板PHP作者 (陳婷婷~親親)時間19年前 (2007/03/01 17:48), 編輯推噓0(004)
留言4則, 1人參與, 最新討論串3/3 (看更多)
我照著這個範例做了一次 可是出現叉燒包耶! php的gd版本有支援png 不知道問題出在哪.. 有沒有大大可以解惑 ※ 引述《Vexed (!~!)》之銘言: : 我其實沒有用過gd 但我猜應該是這樣才對 : 請把你的東西分成兩頁 : 一頁是假設名字叫gd.php好了 內容如下 : <?php : 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 : ImagePng ($img_handle); : ?> : 另一頁則是這樣 : <html> : <head> : <title>GD</title> : </head> : <body> : <img src="gd.php" /> : </body> : </html> : 請試試 :) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.29.79.83

03/01 18:30, , 1F
你要不要先另存新檔再用文字(或hex)編輯器去開
03/01 18:30, 1F

03/01 18:31, , 2F
因為 header 已經送了 image/png 所以 錯誤訊息應該看不到
03/01 18:31, 2F

03/01 18:32, , 3F
我覺得蠻有可能 php-gd.dll/so 還沒 load 進來~
03/01 18:32, 3F

03/01 18:33, , 4F
修正... 沒 load 的話應該會抓不到 function ...
03/01 18:33, 4F
文章代碼(AID): #15vg67j2 (PHP)
討論串 (同標題文章)
本文引述了以下文章的的內容:
請益
1
2
完整討論串 (本文為第 3 之 3 篇):
請益
1
2
請益
2
2
文章代碼(AID): #15vg67j2 (PHP)