<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                YurunPHP中提供了豐富的Session操作和配置,無需手動session_start。 ## 相關配置項 #### SESSION_NAME 用在 cookie 或者 URL 中的會話名稱, 例如:PHPSESSID。 只能使用字母和數字作為會話名稱,建議盡可能的短一些, 并且是望文知意的名字(對于啟用了 cookie 警告的用戶來說,方便其判斷是否要允許此 cookie)。 如果指定了 name 參數, 那么當前會話也會使用指定值作為名稱。 > 會話名稱至少需要一個字母,不能全部都使用數字, 否則,每次都會生成一個新的會話 ID。 #### SESSION_SAVEPATH 指定Session文件存儲目錄,如果不指定按照PHP默認配置存儲。 #### SESSION_USE_COOKIES sessionid在客戶端采用的存儲方式,置1代表使用cookie記錄客戶端的sessionid,同時,$_COOKIE變量里才會有$_COOKIE['PHPSESSIONID']這個元素存在 #### SESSION_CACHE_EXPIRE Session的緩存有效期,單位為分鐘 #### SESSION_CACHE_LIMITER 指定緩存機制名字 <table class="doctable table"> <thead> <tr class="firstRow"> <th> 值 </th> <th> 發送的Header </th> </tr> </thead> <tbody class="tbody"> <tr> <td> public </td> <td> <pre>Expires: (sometime in the future, according session.cache_expire) Cache-Control: public, max-age=(sometime in the future, according to session.cache_expire) Last-Modified: (the timestamp of when the session was last saved)</pre> </td> </tr> <tr> <td> private_no_expire </td> <td> <pre>Cache-Control: private, max-age=(session.cache_expire in the future), pre-check=(session.cache_expire in the future) Last-Modified: (the timestamp of when the session was last saved)</pre> </td> </tr> <tr> <td> private </td> <td> <pre>Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: private, max-age=(session.cache_expire in the future), pre-check=(session.cache_expire in the future) Last-Modified: (the timestamp of when the session was last saved)</pre> </td> </tr> <tr> <td> nocache </td> <td> <pre>Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache</pre> </td> </tr> </tbody> </table> #### SESSION_GC_PROBABILITY 每次請求時觸發Session失效緩存清理的概率。取值范圍:0.0-1.0 #### SESSION_MAX_LIFETIME Session數據在服務器端儲存的時間,如果超過這個時間,那么Session數據就自動刪除! #### SESSION_PREFIX SESSION前綴 #### SESSION_USER_SAVE_HANDLER Session用戶處理類名 ## 方法 #### 設置Session ~~~ Session::set($name, $value) ~~~ | 參數名 | 描述 | | -- | -- | | $name | session名稱 | | $value | session值 | ~~~ Session::set('pwd','123456'); // $_SESSION['pwd'] = '123456'; Session::set('@.pwd','123456'); // $_SESSION['prefix']['pwd'] = '123456'; ~~~ #### 獲取Session ~~~ Session::get($name = null, $default = false) ~~~ | 參數名 | 描述 | | -- | -- | | $name | session名稱 | | $default | 默認值 | ~~~ Session::get('pwd','123456'); // 取$_SESSION['pwd'],如果不存在返回123456 Session::get('@.pwd'); // 取$_SESSION['prefix']['pwd']的值 ~~~ #### 刪除Session ~~~ Session::delete($name = null) ~~~ | 參數名 | 描述 | | -- | -- | | $name | session名稱 | ~~~ Session::delete('pwd'); // 刪除$_SESSION['pwd'] Session::delete('@.pwd'); // 刪除$_SESSION['prefix']['pwd']的值 ~~~ #### 清空Session ~~~ Session::clear() ~~~ #### Session值是否存在 ~~~ Session::exists($name) ~~~ | 參數名 | 描述 | | -- | -- | | $name | session名稱 | ~~~ Session::exists('pwd'); // $_SESSION['pwd']是否存在 Session::exists('@.pwd'); // $_SESSION['prefix']['pwd']是否存在 ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看