代码是这样子的
pic.php
<?php
header("Content-type: image/png");
$im = @imagecreate(110, 20) or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
ImagePNG($im);
//ImagePNG($im,"11.png");
imagedestroy($im);
?>
html 文件
<html>
<body><img src=pic.php></img></body>
</html>gd库是没有问题的,因为在pic.php里面我都可以保持成png文件。
感谢各位大大了。
pic.php
<?php
header("Content-type: image/png");
$im = @imagecreate(110, 20) or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
ImagePNG($im);
//ImagePNG($im,"11.png");
imagedestroy($im);
?>
html 文件
<html>
<body><img src=pic.php></img></body>
</html>gd库是没有问题的,因为在pic.php里面我都可以保持成png文件。
感谢各位大大了。
解决方案 »
- 请高手参与写PHP书籍
- system()执行中的问题
- 类似404错误,如何定位?研究近3小时无果,若此难不除,将无心吃饭。
- 如何将新浪网上提供的娱乐类RSS的XML文档解析后放到自己的网站上,需要详细代码,在线等,急得很。。。
- php class 的引用问题
- 如何传递URL参数值呢?
- 大家来帮一下忙吧,应该是很简单的,谢谢了
- 在2000下安装php编程,要不要象asp(本人略通asp)那样设置odbc数据源,哪个iodbc是做什么用的
- 类似select count(*) from $table 的问题求教!
- 如何实现多站连发
- 急求 图像处理函数错误
- 所有用户共享一个(可修改,却不能改变)表的内容
郁闷