[請益] GD繪圖
用網路上的範例跑不出來>"<
用火狐開顯示:無法顯示錯誤的圖片
用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
05/04 22:23, 1F
推
07/25 10:45, , 2F
07/25 10:45, 2F
討論串 (同標題文章)
PHP 近期熱門文章
PTT數位生活區 即時熱門文章