Home  >  Article  >  Backend Development  >  请问,怎么使用gd操作直接生成图片文件?

请问,怎么使用gd操作直接生成图片文件?

WBOY
WBOYOriginal
2016-06-23 13:26:48915browse

比如这样的代码(file1.php):


我只能在另一个文件中,通过这样的html代码  请问,怎么使用gd操作直接生成图片文件?  来显示该图片。

我想实现的效果是,在一个php文件(网页)中,刷新一下,就在该网页的本身目录(文件夹)下,生成一张图片文件。网页界面上能不能看到无所谓。图片文件名可以采用某种不重复的随机字符来表示,图片上的文字内容当然也可以随机。这都不是重点。重点就是,刷新一下网页,就得到一个图片文件。


回复讨论(解决方案)

imagePng( $img, "图片文件名" );

在imagepng(image,路径加上名字)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn