【php开源代码栏目提醒】:以下是网学会员为您推荐的php开源代码-9.9.php,希望本篇文章对您学习有所帮助。
<?php
$img = imageCreate(100, 100);
$black = imageColorAllocate($img, 0, 0, 0);
$white = imageColorAllocate($img, 255, 255, 255);
$orange = imageColorAllocate($img, 255, 128, 64);
$lightorange = imageColorAllocate($img, 255, 220, 164);
imageFilledRectangle($img, 0, 0, 100, 100, $white);
imageRectangle($img, 0, 0, 99, 99, $black);
imageRectangle($img, 5, 5, 94, 94, $black);
$points = Array(12,10, 20,15,15,20);
$nump = (int) count($points)/2;
imagePolygon($img, $points, $nump, $orange);
imageLine($img, 17, 18, 27, 33, $orange);
imageLine($img, 18, 18, 28, 33, $lightorange);
imageLine($img, 19, 18, 29, 33, $orange);
imageRectangle($img, 15, 33, 80, 75, $orange);
imageFill($img, 14, 14, $lightorange);
imageFill($img, 20, 40, $lightorange);
imageString ($img, 2, 20, 40, "I'm a
PHP", $black);
imageString ($img, 2, 30, 55, "image", $black);
imagePNG($img);
?>