首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > PHP >

PHP5中Session小结(一)

2012-09-10 
PHP5中Session总结(一)一. Session的配置与应用?1.?bool ?php// Initialize the session.// If you are u

PHP5中Session总结(一)

一. Session的配置与应用

?

1.?bool <?php// Initialize the session.// If you are using session_name("something"), don't forget it now!session_start();// Unset all of the session variables.$_SESSION = array();// If it's desired to kill the session, also delete the session cookie.// Note: This will destroy the session, and not just the session data!if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time()-42000, '/');}// Finally, destroy the session.session_destroy();?>?

?