验证码一直无法刷新, 功能已经实现了
问题
验证码一直无法刷新, 功能已经实现了.
解决方法
验证码:
复制代码怎么做成可以点击刷新???
程序地址: [url=http://www.fenanr.com/phpnew/]链接标记http://www.fenanr.com/phpnew/[/url]
[ ]
附件: 您所在的用户组无法下载或查看附件
参考答案
function reloadcode(){
var verify=document.getElementById('safecode');
verify.setAttribute('src','http://www.zzzyk.com/phper/31/gdcode.php&'+Math.random());
}
........
复制代码on_click
改一下...
[ ]
参考答案
我是内建随机码的,, 不从GET上取...
参考答案
刷新当前页
参考答案
原帖由 wbsifan 于 2009-1-3 16:30 发表 [url=http://bbs.226511.com/redirect.php?goto=findpost&pid=813707&ptid=100261]链接标记[img]http://bbs.226511.com/images/common/back.gif[/img][/url]
刷新当前页
学习你的思路, 已经弄好了.. 你测试一下..
[url=http://www.fenanr.com/phpnew/index.php]链接标记http://www.fenanr.com/phpnew/index.php[/url] 看有没有BUG
参考答案
内建验证码?为什么要这样做?调用多方便
参考答案
挺好...
个人认为这种验证码 不应该内建
参考答案
验证码怎么改文字的样式的, 比如大小.. 比如字体..
/**
* @category: 分享工作室;
* @copyright: 分享在线传媒公社;
* @var; 图片验证码显示;
* @version: PHPnew 5.0;
*/
define('FEN','gdcode');
include_once('./include/commn.inc.php');
Header("Content-type: image/PNG");
$id = intval($id);
if($id===1){
Dsetcookie('imgsrc','',-3600);
$authnum = setrand('imgsrc',5,'A',1);
}else {
$authnum = setrand('imgsrc',5,'A');
}
$im = imagecreate(70,20) or die("Cant's initialize new GD image stream!"); //制定图片背景大小
$red = ImageColorAllocate($im, 255,0,0); //设定三种颜色
$white = ImageColorAllocate($im, 255,255,255);
$gray = ImageColorAllocate($im, 200,200,200);
imagefill($im,0,0,$white);//ed
imagestring($im, 5, 10, 3, $authnum, $red);
for($i=0;$i<400;$i++){ //加入干扰象素 {
$randcolor = ImageColorallocate($im,rand(0,255),rand(0,255),rand(0,255));
imagesetpixel($im, rand()%90 , rand()%30 , $gray);
}
ImagePNG($im);
ImageDestroy($im);
?>
复制代码[ ]
参考答案
关键要看你是生成图片的代码了
参考答案
如果你用的内建字体,没办法啊,不过你可以找一个实例参考一下,把字符扭曲。
补充:Php教程,常见问题