第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

php中session_destroy()的作用?

php中session_destroy()的作用?

幕布斯7119047 2019-02-05 10:06:17
session_destroy() destroys all of the data associated with the current session. It does not unset any of the global variables associated with the session, or unset the session cookie. To use the session variables again, session_start() has to be called. 它會destroys all of the data associated with the current session,但是它既不注銷變量,又不注銷session cookie。那它做了什么?還有這個函數(shù)有什么用呢?
查看完整描述

2 回答

?
MM們

TA貢獻1886條經(jīng)驗 獲得超2個贊

終結 Session
如果您希望刪除某些 session 數(shù)據(jù),可以使用 unset() 或 session_destroy() 函數(shù)。

unset() 函數(shù)用于釋放指定的 session 變量:

<?php
unset($_SESSION['views']);
?>
您也可以通過 session_destroy() 函數(shù)徹底終結 session:

<?php
session_destroy();
?>
注釋:session_destroy() 將重置 session,您將失去所有已存儲的 session 數(shù)據(jù)。



查看完整回答
反對 回復 2019-03-16
  • 2 回答
  • 0 關注
  • 1532 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號