From 2c4bfa283a50813ee2ffa9f9218554915c1a236f Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 24 Sep 2019 18:50:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/IndexController.class.php | 16 ++++++---------- ThinkPHP/Library/Think/Verify.class.php | 6 ------ phpinfo.php | 2 ++ 3 files changed, 8 insertions(+), 16 deletions(-) create mode 100644 phpinfo.php diff --git a/Application/Home/Controller/IndexController.class.php b/Application/Home/Controller/IndexController.class.php index 59a8185bb..f5e2133b5 100644 --- a/Application/Home/Controller/IndexController.class.php +++ b/Application/Home/Controller/IndexController.class.php @@ -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, ); diff --git a/ThinkPHP/Library/Think/Verify.class.php b/ThinkPHP/Library/Think/Verify.class.php index cebb6e3d4..6e5e38ae8 100644 --- a/ThinkPHP/Library/Think/Verify.class.php +++ b/ThinkPHP/Library/Think/Verify.class.php @@ -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); diff --git a/phpinfo.php b/phpinfo.php new file mode 100644 index 000000000..2fa593917 --- /dev/null +++ b/phpinfo.php @@ -0,0 +1,2 @@ +