//产生的验证码 private $mCheckCode = ''; //验证码的图片 private $mCheckImage = ''; //干扰像素 private $mDisturbColor = ''; //验证码的图片宽度 private $mCheckImageWidth = '80'; //验证码的图片宽度 private $mCheckImageHeight = '20'; /** * * @brief 输出头 * */ private function OutFileHeader() { header ("Content-type: image/png"); } /** * * @brief 产生验证码 * */ pri...
原文转自: http://hi.baidu.com/aspboy/blog/item/34107ecf2dad363df8dc61fc.html 几个GD函数堆砌出来的玩意,只要搞定怎样把中文写到图片上就可以了,因为GD函数只接受UTF8格式编码的文字,所以在写文字前首先要进行编码转换。php自带的iconv和mbstring库都可以完成这项工作,但一般的虚拟主机很少支持,所以要自己写个,像这里用gb2utf8完成这项工作。当然如果你的页面就是以UTF8格式存储的,就可以省去这些额外工作。 ...
?php /** * @name 验证码类 * @author BianJiang * @since 2007-06-07 * @link liuxingyuyuni.cublog.cn * @history * */ class IndentifyCode { private $img; //验证码图像类型 private $imgType; //验证码图片宽度 private $imgWidth; //验证码图片高度 private $imgHeight; //验证码字符串 ...
成功显示php图片验证码,不知道接下来做什么? 我的php验证图片显示成功- -名称 number1.php 代码如下 php Header("Content-type: image/PNG"); srand((double)microtime()*1000000);//播下一个生成随机数字的种子,以方便下面随机数生成的使用 $im = imagecreate(62,20); //制定图片背景大小 $black = ImageColorAllocate($im, 0,0,0); //设定三种颜色 $white = ImageColorAllocate($im, 255,255,255); $gray = ImageC...
验证码。在Windows主机下没有任何问题。。 换了个linux 主机就不行了。。背景图片能正常绘制出来,但验证码没有显示。。。。。 [code] php // $refererhost = parse_url($_SERVER['HTTP_REFERER']); $refererhost['host'] .= !empty($refererhost['port']) ? (' :'.$refererhost['port']): ''; if ($refererhost['host'] != $_SERVER['HTTP_HOST']) { exit('Access Denied'); } // session_start(); //图片类型 header("Con...
现在是这样 http://www.abc.com/ 直接就是显示http://www.abc.com/index.php 如何能让他访问http://www.abc.om/ 显示的就是http://www.abc.com/
今天用一个php的小例子测试配置的Linux+Apache+Mysql+php (LAMP)。没想到拔出萝卜带出一堆泥。多亏同学龚的帮忙,解决了问题,虽然问题的详细原因还不明,但这种方法的确解决了问题,也希望清楚这个问题根源 的朋友,麻烦告诉我。现将问题和解决方法记录下来. 1、问题: 文件index.php Web Database Sample Index "; echo " User Name Domain Name Request Date "; while ($r = mysql_fetch_array($resul...
看看内容吧,也许有用的。我的系统是RedHat8。 short_open_tag =On //php.ini Aaah, I see. Redhat seems to mess with all sorts of typical defaults, heck, even short_open_tag (default redhat8.0 php setup and that just isn't very nice. Although, maybe it's good to push people into learning stuff, like why it's important to read a php.ini :) link: http://www.phpbuilder.com/lists/php-general/2003041/0981...
:em06: :em06: httpd.conf文件也改为:AddDefaultCharset GB2312 [code]网页头也加进了 ; ,其中LBL_CHARSET="gb2312" [/code] 可访问时却是乱码。查看源代码也都是中文,每次需要调整,查看-->;编码--》简体中文才能看到中文。 这是怎么回事呢,请帮忙 :em06: :em06: