如何使用PHP在图片上添加特定字体的文字?
- 内容介绍
- 文章标签
- 相关推荐
本文共计44个文字,预计阅读时间需要1分钟。
php
<?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); ?>
本文共计44个文字,预计阅读时间需要1分钟。
php
<?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); ?>

