图形函数问题,急! 楼主说的是什么意思.我运行你的代码,就只生成了一个4位数的图片,没有什么html呀? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?phpheader ("Content-type: image/png");$im = @imagecreate (45,18) or die ("Cannot Initialize new GD image stream");$background_color = imagecolorallocate ($im, 201,201,201);$text_color = imagecolorallocate ($im, 54,54,54);imagestring ($im,4, 6, 2, rand(1000,9999), $text_color);imagepng ($im);imagedestroy ($im);header ("Content-type: text/html;");?><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>新用户注册</title></head><body>hello</body></html>后边的hello显不出来 <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>新用户注册</title></head><body><table width="500" border="0" cellspacing="1" cellpadding="0"> <tr> <td width="250" valign="top"><img name="pic" src="pic.php" width="250" height="300" alt=""> </td> <td>hello</td> </tr> </table></body></html>要把生成图片的php和放置图片的html分为两个文件你那种写法不会运行下面的html 在页面中加入随机图片等PHP生成图片的方法1 写一段生成图片的代码(这个楼主已经完成了)2 将这段代码单独保存起来,起一个名字,如pic.php3 在别的页面中引用这个图片程序,方法同在页面里插一个图片是一样的.楼主再试一下:) 不要和html混在一起图片程序单独存为一个文件 <img src="pic.php" alt="image" /> 为什么用这段代码发的邮件,收件人会出现两次? php调用asp.net的webservice接口时,为什么不能传递参数? php验证码 带自动刷新! 用户通过页面输入的汉字转换为拼音 问题 php 刷新页面 找PHP职位 include 比 include_once 快吗? php 容易学吗??? 关于新闻发布问题! 三心二意的我,求指导 求助!打开一个php页面,却提示下载页面!!! 为什么这么代码没有任何显示?
header ("Content-type: image/png");
$im = @imagecreate (45,18)
or die ("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate ($im, 201,201,201);
$text_color = imagecolorallocate ($im, 54,54,54);
imagestring ($im,4, 6, 2, rand(1000,9999), $text_color);
imagepng ($im);
imagedestroy ($im);
header ("Content-type: text/html;");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新用户注册</title>
</head><body>
hello
</body>
</html>
后边的hello显不出来
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新用户注册</title>
</head><body>
<table width="500" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="250" valign="top"><img name="pic" src="pic.php" width="250" height="300" alt="">
</td>
<td>hello</td>
</tr>
</table>
</body>
</html>
要把生成图片的php和放置图片的html分为两个文件
你那种写法不会运行下面的html
2 将这段代码单独保存起来,起一个名字,如pic.php
3 在别的页面中引用这个图片程序,方法同在页面里插一个图片是一样的.
楼主再试一下:)
图片程序单独存为一个文件