PHP is not just used to build HTML output. It can also be used to make GIF graphics files, and even make a more convenient GIF image stream. To do this, you will need to use the GD libraries to compile the PHP source files.
Example 2-2. Use PHP to create GIF files
Header ("Content-type:image/gif");
$string =implode ($ARGV, "");
$im = Imagecreatefromgif ("Images/button1.gif");
$orange = Imagecolorallocate ($im, 220, 210, 60);
$PX = (Imagesx ($im) -7.5*strlen ($string))/2;
Imagestring ($im, 3, $px, 9, $string, $orange);
Imagegif ($im);
Imagedestroy ($im);
?>
This example will be called by a page using a method similar to:. The script for BUTTON.PHP3 will cover this piece of text on the basic graph ("images/button1.gif" here) and then output the resulting graphic. This is an easy way to prevent the button graphic from being redrawn whenever the user wishes to change the text of the key. Using this method, they will be used dynamically.
http://www.bkjia.com/PHPjc/531917.html www.bkjia.com true http://www.bkjia.com/PHPjc/531917.html techarticle PHP is not just used to build HTML output. It can also be used to make GIF graphics files, and even make a more convenient GIF image stream. To do this, you will need to compile with the GD Library of functions ...