php简单图像创建入门实例

yipeiwu_com6年前PHP代码库

本文实例讲述了php简单图像创建方法。分享给大家供大家参考。具体实现方法如下:

<?php 
$image = imagecreatetruecolor(200,100); 
$text_color = imagecolorallocate($image,255,255,255); 
imagestring($image,5,0,0,"Hello World!",$text_color); 
imagepng($image); 
imagedestroy($image); 
?>

运行后显示如下:

希望本文所述对大家的php程序设计有所帮助。

相关文章

PHP sprintf()函数用例解析

复制代码 代码如下: <?php //sprintf()函数,返回值为格式化后的字符串 string sprintf ( string $format [, mixed $args...

php获取根域名方法汇总

本文实例汇总了php获取根域名方法,分享给大家供大家参考。具体实现方法如下: 如果你只简单获取当前访问你页面的域名,我们只需要使用php中的函数HTTP_HOST就可以搞定了,如果是提取...

CodeIgniter与PHP5.6的兼容问题

错误提示: A PHP Error was encountered Severity: Notice Message: Only variable references shou...

PHP number_format() 函数定义和用法

number_format() 函数通过千位分组来格式化数字。 语法 number_format(number,decimals,decimalpoint,separator)...

PHP项目开发中最常用的自定义函数整理

<?php //alert提示 function alert($msg){ echo "<script>alert('$msg');</script>";...