- 最后登录
- 2010-4-2
- 在线时间
- 5 小时
- 个人主页
- 注册时间
- 2009-12-24
- 阅读权限
- 10
- 帖子
- 47
- 精华
- 0
- UID
- 4

|
发表于 2009-12-25 21:22:21
|显示全部楼层
非常简单的一个验证码,使用也很容易,sp中使用方法如下:在控制器中建立如下方法
function verifyCode(){
session_start();
header("Content-type: image/png");
$image=spClass('Verify');
$_SESSION['verify_code']=$image->show();
}
就可以了。
当然在普通php文件中使用也很简单,
<?php
session_start();
header("Content-type: image/png");
include("verify.php");
$image=new verify();
$_SESSION['ver_code']=$image->show();
?>
不妨试试吧。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?论坛注册
|