master
ELF 5 years ago
parent 8375c8f6e7
commit 2c4bfa283a

@ -24,10 +24,6 @@ class IndexController extends HomeController
//系统首页
public function index()
{
var_dump($_SESSION);
session('stest', 'ssb');
var_dump($_SESSION);
die();
$map['game_status'] = 1;
$map['recommend_status'] = 1;
$rec_data = M('Game', "tab_")->where($map)->group('relation_game_id')->order('id DESC')->limit(36)->select();
@ -197,12 +193,12 @@ class IndexController extends HomeController
public function verify($vid = '')
{
$config = array(
'seKey' => 'ThinkPHP.CN', // 验证码加密密钥
'fontSize' => 16, // 验证码字体大小(px)
'imageH' => 42, // 验证码图片高度
'imageW' => 107, // 验证码图片宽度
'length' => 4, // 验证码位数
'fontttf' => '4.ttf', // 验证码字体,不设置随机获取
'seKey' => 'ThinkPHP.CN', //验证码加密密钥
'fontSize' => 16, // 验证码字体大小(px)
'imageH' => 42, // 验证码图片高度
'imageW' => 107, // 验证码图片宽度
'length' => 4, // 验证码位数
'fontttf' => '4.ttf', // 验证码字体,不设置随机获取
'useCurve' => false,
);

@ -83,12 +83,9 @@ class Verify {
* @return bool 用户验证码是否正确
*/
public function check($code, $id = '') {
var_dump($_SESSION);
$key = $this->authcode($this->seKey).$id;
var_dump($key);
// 验证码不能为空
$secode = session($key);
var_dump($secode);
if(empty($code) || empty($secode)) {
return false;
}
@ -176,10 +173,7 @@ class Verify {
$secode = array();
$secode['verify_code'] = $code; // 把校验码保存到session
$secode['verify_time'] = NOW_TIME; // 验证码创建时间
session($key.$id, $secode);
var_dump($_SESSION);
die();
header('Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);

@ -0,0 +1,2 @@
<?php
echo phpinfo();
Loading…
Cancel
Save