HTML記述とimage関数
created: 2008-06-03 16:56 | modified: 2008-06-03 20:01 | reply: 4
[4181] HTML記述とimage関数 - ほうじ茶 - 2008-06-03 16:56- [4182] IMGタグもリクエストです - ゆうじ - 2008-06-03 17:45
- [4183] パラメータの受け渡しがある場合 - ほうじ茶 - 2008-06-03 18:30
- [4184] $_GETにしてみては - ゆうじ - 2008-06-03 18:56
- [4185] ありがとうございました!! - ほうじ茶 - 2008-06-03 20:01
[4181] HTML記述とimage関数
user: ほうじ茶 | created: 2008-06-03 16:56
たびたび申し訳ありません。
下記の簡単なコードのようにHTML記述内にimage関数を使用して画像出力しようと思ったのですが、文字化けしてしまい正しく表示されませんでした。
↓↓単純に画像を出力するスクリプト↓↓
<html>
<head>
<title>test</title>
</head>
<body>
<?php
header( "Content-Type: image/png" );
$image = imagecreate( 120, 120 );
$green = imagecolorallocate( $image, 131, 195, 28 );
$white = imagecolorallocate( $image, 255, 255, 255 );
imagearc( $image, 60, 60, 100, 60, 0, 360, $white );
imagepng( $image );
imagedestroy( $image );
?>
</body>
</html>
【入力画面⇒入力値にてSQL⇒SQLの値にて円グラフ表示】
という流れを作りたいのですが現在全て一画面で作るにしろ二画面遷移させるにしろhtmlを使いたいのですが、良いアドバイスはありますでしょうか?
下記の簡単なコードのようにHTML記述内にimage関数を使用して画像出力しようと思ったのですが、文字化けしてしまい正しく表示されませんでした。
↓↓単純に画像を出力するスクリプト↓↓
<html>
<head>
<title>test</title>
</head>
<body>
<?php
header( "Content-Type: image/png" );
$image = imagecreate( 120, 120 );
$green = imagecolorallocate( $image, 131, 195, 28 );
$white = imagecolorallocate( $image, 255, 255, 255 );
imagearc( $image, 60, 60, 100, 60, 0, 360, $white );
imagepng( $image );
imagedestroy( $image );
?>
</body>
</html>
【入力画面⇒入力値にてSQL⇒SQLの値にて円グラフ表示】
という流れを作りたいのですが現在全て一画面で作るにしろ二画面遷移させるにしろhtmlを使いたいのですが、良いアドバイスはありますでしょうか?
