取消设置将破坏特定的会话变量,而
session_destroy()将破坏该用户的所有会话数据。
实际上,取决于应使用哪个应用程序。只要记住以上几点即可。
unset($_SESSION['name']); // will delete just the name datasession_destroy(); // will delete ALL data associated with that user.

取消设置将破坏特定的会话变量,而
session_destroy()将破坏该用户的所有会话数据。
实际上,取决于应使用哪个应用程序。只要记住以上几点即可。
unset($_SESSION['name']); // will delete just the name datasession_destroy(); // will delete ALL data associated with that user.