为什么验证码会出不来呀????

浏览:633 发布日期:2016/05/19 分类:求助交流 关键字: 验证码
为什么验证码出不来???


<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
public function index(){
header("Content-Type:text/html; charset=utf-8");
$this->display("reg");
}

function add(){

if(md5($_POST['verify'])!=$_SESSION['verify']){

$this->error("验证码错误");
}

$user=D("User");

if($user->create()){

if($user->add()){

$this->success("注册成功");
}else{

$this->error("注册失败");
}

}else{

$this->error($user->getError());


}

}
function verify(){
import("ORG.Util.Image");
image::buildImageVerify(4,1,'gif',60,22,'verify');

}




}
最佳答案
评论( 相关
后面还有条评论,点击查看>>