<img src="phplot_img.php" />
2、在打开页面能看到,就要通过 header 函数发送头信息,告知浏览器要显示的是图片,同时输出图片内容,那么就可以看到了:
$p = new PHPlot(800, 400)
//
$p->DrawGraph()
// 该 DrawGraph() 里调用了 PrintImage() 方法
// 在 PrintImage() 方法里,有这句代码,Header("Content-type: $mime_type")
// 就是告知浏览器接收到的数据是一张图片.
在你想要插入的地方输出即可<?php $img = "img.jpg" ?>
<?php echo "<img src='"+$img+"'/>"?>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)