PHP — Cookie and Session篇
生活随笔
收集整理的這篇文章主要介紹了
PHP — Cookie and Session篇
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、Cookie
例:setcookie('username',' $name',time()+3600);
2.在服務器端讀取cookie內容
$_COOKIE if(!isset($_COOKIE['username']))3.將多維數組應用到Cookie中
setcookie("member[name]",'薛之謙');setcookie("member[password]",‘xiaobaixue');4.刪除Cookie
setcookie("member", ' ',time() -1); setcookie('username',$name,time()-1);二、Session
1.開啟session
總結
以上是生活随笔為你收集整理的PHP — Cookie and Session篇的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HTML+MYSQL+PHP搭建带有co
- 下一篇: PHP—正则表达式