<?php
namespace Home\Controller;
use Think\Controller;
class CaptchaController extends Controller {
public function indexAction() {
$Verify = new \Think\Verify();
$Verify->entry();
}
}
发现不起作用,环境是没有问题的.apache日志里也没有提示错误.
参考官方手册:http://document.thinkphp.cn/manual_3_2.html#verify
OneThink是这么用的<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 zuojiazi@vip.qq.com http://www.zjzit.cn
// +----------------------------------------------------------------------
namespace Admin\Controller;
use User\Api\UserApi;
/**
* 后台首页控制器
* @author 麦当苗儿 zuojiazi@vip.qq.com
*/
class PublicController extends \Think\Controller {
/**
* 后台用户登录
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
public function login($username = null, $password = null, $verify = null){
}
/* 退出登录 */
public function logout(){
if(is_login()){
D('Member')->logout();
session('[destroy]');
$this->success('退出成功!', U('login'));
} else {
$this->redirect('login');
}
}
public function verify(){
$verify = new \Think\Verify();
$verify->entry(1);
}
}