#1 setlt
非常简单的一个验证码,使用也很容易,sp中使用方法如下:在控制器中建立如下方法
function verifyCode(){
session_start();
header("Content-type: image/png");
$image=spClass('Verify');
$_SESSION['verify_code']=$image->show();
}
当然在普通php文件中使用也很简单,
session_start();
header("Content-type: image/png");
include("verify.php");
$image=new verify();
$_SESSION['ver_code']=$image->show();
?>
Verify.rar
2009-12-25 21:22:21