(PHP 4, PHP 5, PHP 7)
imagechar — 水平锟截伙拷一锟斤拷锟街凤拷
$image
, int $font
, int $x
, int $y
, string $c
, int $color
) : bool
imagechar() 锟斤拷锟街凤拷锟斤拷
c
锟侥碉拷一锟斤拷锟街凤拷锟斤拷锟斤拷
image
指锟斤拷锟斤拷图锟斤拷锟叫o拷锟斤拷锟斤拷锟较斤拷位锟斤拷
x
锟斤拷y
锟斤拷图锟斤拷锟斤拷锟较斤拷为 0,
0锟斤拷锟斤拷锟斤拷色为 color
锟斤拷锟斤拷锟� font
锟斤拷 1锟斤拷2锟斤拷3锟斤拷4 锟斤拷 5锟斤拷锟斤拷使锟斤拷锟斤拷锟矫碉拷锟斤拷锟藉(锟斤拷锟斤拷锟斤拷锟斤拷侄锟接︼拷诟锟斤拷锟斤拷锟斤拷锟藉)锟斤拷
Example #1 imagechar() 锟斤拷锟斤拷
<?php
$im = imagecreate(100,100);
$string = 'PHP';
$bg = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
// prints a black "P" in the top left corner
imagechar($im, 1, 0, 0, $string, $black);
header('Content-type: image/png');
imagepng($im);
?>
锟轿硷拷 imagecharup() 锟斤拷 imageloadfont()锟斤拷