作者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