$image = imagecreate(80, 22);$color_black = imagecolorallocate($image, 0, 0, 0);
$color_white = imagecolorallocate($image, 255, 255, 255);imagefill($image, 0, 0, $color_black);$random_text = $_SESSION["sess_verify_code"];imagechar($image, 4, 10, 4, $random_text[0] ,$color_white);
imagechar($image, 4, 20, 4, $random_text[1] ,$color_white);
imagechar($image, 4, 30, 4, $random_text[2] ,$color_white);
imagechar($image, 4, 40, 4, $random_text[3] ,$color_white);
imagechar($image, 4, 50, 4, $random_text[4] ,$color_white);
imagechar($image, 4, 60, 4, $random_text[5] ,$color_white);header("Content-type: image/png");
imagepng($image);
$color_white = imagecolorallocate($image, 255, 255, 255);imagefill($image, 0, 0, $color_black);$random_text = $_SESSION["sess_verify_code"];imagechar($image, 4, 10, 4, $random_text[0] ,$color_white);
imagechar($image, 4, 20, 4, $random_text[1] ,$color_white);
imagechar($image, 4, 30, 4, $random_text[2] ,$color_white);
imagechar($image, 4, 40, 4, $random_text[3] ,$color_white);
imagechar($image, 4, 50, 4, $random_text[4] ,$color_white);
imagechar($image, 4, 60, 4, $random_text[5] ,$color_white);header("Content-type: image/png");
imagepng($image);
解决方案 »
- php留言板发布到服务器后不能正常运行,本地测试可以
- 在Discuzx中用什么方法来实现截取内容在主题列表显示
- php+mssql 连接代码怎么写?还有我提示的错误是MSSQL没配置好吗?
- IE和360安全浏览器不显示flash和视频网站视频了,Firefox可以,怎么弄好?
- 这个例子为什么要用basename
- 问一个高级问题:php是否可转换成机器语言(exe)
- 在网上抓取一个图片保存到本地的php函数怎么写?
- 如何控制框架同步?
- php中做下载时,打开来的word文档总是乱码?
- PHPadmin登录提示错误2045
- 为什么不能显示输入框的内容?
- PostgreSQL下limit查询的问题。急!
在php.ini中把extension=php_gd2.dll前面的;去掉
也重起了还是不行,怎么回事???