21,887
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>6-2</title>
</head>
<body>
<?php
header("Content-type:image/png");
$im = @imagecreate(200,100)or die("11");
@imagecolorallocate($im,240,150,225);
$t_color1 = imagecolorallocate($im,0,0,0);
$t_color2 = imagecolorallocate($im,100,100,100);
imagestring($im,5,8,10,"I like PHP!",$t_color1);
imagestringup($im,5,8,90,"Hello!",$t_color2);
imageellipse($im,65,65,55,55,$t_color1);
imagefilledrectangle($im,110,95,160,30,$t_color2);
imagepng($im);
imagedestroy($im);
?>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>6-1</title>
</head>
<body>
<img src="6-2.php">
</body>
</html>
<?php
header("Content-type:image/png");
$im = @imagecreate(200,100)or die("11");
@imagecolorallocate($im,240,150,225);
$t_color1 = imagecolorallocate($im,0,0,0);
$t_color2 = imagecolorallocate($im,100,100,100);
imagestring($im,5,8,10,"I like PHP!",$t_color1);
imagestringup($im,5,8,90,"Hello!",$t_color2);
imageellipse($im,65,65,55,55,$t_color1);
imagefilledrectangle($im,110,95,160,30,$t_color2);
imagepng($im);
imagedestroy($im);
?>