$im = imagecreate(100, 30);// 白色背景和蓝色文本
$bg = imagecolorallocate($im, 255, 235, 235);
$textColor = imagecolorallocate($im, 255, 255, 255);
imagestring($imgBG, $textFont, $xValue, $yValue, $textValue, $textColor);
这样写有问题吗?
怎么能改变字体颜色,我想写白色的字.
$bg = imagecolorallocate($im, 255, 235, 235);
$textColor = imagecolorallocate($im, 255, 255, 255);
imagestring($imgBG, $textFont, $xValue, $yValue, $textValue, $textColor);
这样写有问题吗?
怎么能改变字体颜色,我想写白色的字.
解决方案 »
- PHP上传有问题,总是显示valid file
- 广州招聘PHP程序员
- php怎么取数据库中所有每条记录的IP的前二位,与固定的某IP(如118.15或183.67)比对?
- 日文系统下不能保存日文,中文下面能保存日文
- [北京] 收成在线招牌ASP或PHP程序员
- 求助各位高手:为什么我的上传在WINDOWS下能正常运行,放到UNIX下就不能上传了?
- 狂急!mysql远程连接突然变慢?不知什么原因?
- php配置,忙了两天还是不解原因!!求助了!!
- 谁PHP+MYSQL开发网上购物系统的经验,请进
- php的文件读取和写入似乎对未知格式的文件不管用
- php新手问题
- PHP调用MSSQL存储过程(使用链接服务器)出现的问题
=======================================================
$textColor = imagecolorallocate($im, 255, 255, 255);//这个是白色字体$textColor = imagecolorallocate($im, 0, 0, 0);//这个是黑色字体
大哥,我就是按你这样做的,结果还是黑色,所以我郁闷了.我以为是缓存的原因,后面加了?random也不行
==================================
header("Content-type: image/png");
$im = imagecreate(100, 30)
imagecolorallocate($im, 0, 255, 0);//绿底
$textColor = imagecolorallocate($im, 0, 0, 0);//黑字
//$textColor = imagecolorallocate($im, 255, 255, 255);//白字
imagestring($im, 1, 5, 5, "A Simple Text String", $textColor);
imagepng($im);
imagedestroy($im);