Home >Backend Development >PHP Tutorial >一个建立png图像的例子_PHP

一个建立png图像的例子_PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 12:38:21924browse

Header("Content-type: image/png");

$string=implode($argv," ");

$im = imageCreateFromPng("images/button1.png");

$orange = ImageColorAllocate($im, 220, 210, 60);

$px = (imagesx($im)-7.5*strlen($string))/2;

ImageString($im,3,$px,9,$string,$orange);

ImagePng($im);

ImageDestroy($im);

?>



如果你想传送文字
需要这样调用

img src="button.php?text=$buttonName" border=0 alt="">
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