master
ELF 5 years ago
parent 8375c8f6e7
commit 2c4bfa283a

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

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

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