<!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>
说明:png图片显示不出来,是一个红叉,GD信息如下:
gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
求高人指点,本人初学者,谢谢
<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>
说明:png图片显示不出来,是一个红叉,GD信息如下:
gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
求高人指点,本人初学者,谢谢
解决方案 »
- eclipsePHP studio 如何配置svn
- Zend Studio使用的问题,奇怪
- 毕业才开始接触程序,公司带我的师傅给了我出了一道关于排序的题,我写的东西总是没输出,麻烦各位进来帮我看一看。
- 怎么把一个列表中选项的值传到下个php界面中
- 将参数带入网页
- 问PHP4的两个小问题,请诸位邦忙看看。
- win2000下连接SQL SERVER
- 请问如何解用zend加密的php代码
- 请教有关session语法的问题!!!
- 我一直想不明白的一个问题,php save files from url,页面个别元素就是获取不到!?
- fopen的问题 - 无法打开文件 - failed to open stream: No such file o
- cookie不会传递的问题
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);
?>把 html 部分去了,试试
以/作为web的顶目录,试试,比如/web/php/test.php
<?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);
?>