作者Vexed (!~!)
看板PHP
標題Re: [請益] GD繪圖
時間Fri May 5 00:51:59 2006
我其實沒有用過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: 220.143.214.250
1F:推 uNielsa:結果出現叉燒包...圖片無法顯示那種叉 05/05 18:19
2F:→ uNielsa:thx~^^ 05/05 18:19