【php开源代码栏目提醒】:以下是网学会员为您推荐的php开源代码-9_7.php,希望本篇文章对您学习有所帮助。
<?php
// 创建一个图像
$image = imagecreate(400, 200);
//分配颜色
$white = imagecolorallocate($image,255,255,255);
$black = imagecolorallocate($image,0,0,0);
//画一个宽300,高100的椭圆
imageellipse($image, 100, 100, 200, 100, $black);
//画一个黑色的圆
imageellipse($image, 200, 100, 150, 150, $black);
//画同心椭圆
imageellipse($image, 300, 100, 100, 150, $black);
imageellipse($image, 300, 100, 120, 170, $black);
//发送头文件信息
header("Content-type: image/png");
//输出PNG图像
imagepng($image);
//释放内存
imagedestroy($image);
?>