php在图片上写指定字体的文字
php在图片上写指定字体的文字 [代码片段(11行)]
<?php
header('Content-type: image/gif');
$image = imagecreate( 400, 200 );
$red = imagecolorallocate($image, 255,0,0);
$blue = imagecolorallocate($image, 0,0,255 );
$font = 'ARIALBD.TTF';
imageTTFtext( $image, 50, 0, 20, 100, $blue, $font, 'outofmemory.cn' );
imagegif($image);
?>
- 上一篇:php basename函数使用
- 下一篇:php array_diff使用实例i
精彩图集
精彩文章






