From 4acf06a22019be057c549984e36af6c4c181c7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=99=88=E5=8F=94=E5=8F=94?= Date: Wed, 13 Jan 2016 14:05:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Evar=5Fsession=5Fid=E9=85=8D?= =?UTF-8?q?=E7=BD=AE,=E8=A7=A3=E5=86=B3flash=E4=B8=8A=E4=BC=A0session?= =?UTF-8?q?=E8=B7=A8=E5=9F=9F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- convention.php | 10 +++++----- library/think/Session.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/convention.php b/convention.php index 2659285e..78bced55 100644 --- a/convention.php +++ b/convention.php @@ -136,12 +136,12 @@ return [ // 是否使用session 'use_session' => true, - 'var_session_id' => '', // SESSION_ID的提交变量 'session' => [ - 'id' => '', - 'prefix' => 'think', - 'type' => '', - 'auto_start' => true, + 'id' => '', + 'var_session_id' => '', // SESSION_ID的提交变量,解决flash上传跨域 + 'prefix' => 'think', + 'type' => '', + 'auto_start' => true, ], // +---------------------------------------------------------------------- diff --git a/library/think/Session.php b/library/think/Session.php index 02fc33c8..1e832779 100644 --- a/library/think/Session.php +++ b/library/think/Session.php @@ -39,8 +39,8 @@ class Session if (isset($config['prefix'])) { self::$prefix = $config['prefix']; } - if (Config::get('var_session_id') && isset($_REQUEST[Config::get('var_session_id')])) { - session_id($_REQUEST[Config::get('var_session_id')]); + if ($config['var_session_id'] && isset($_REQUEST[$config['var_session_id']])) { + session_id($_REQUEST[$config['var_session_id']]); } elseif (isset($config['id']) && !empty($config['id'])) { session_id($config['id']); }