When using session_destroy() to log out the Session variable,
appearedWarning: session_destroy() [function.session-destroy]: Trying to destroy
uninitialized session in
’s error! ! After verification, the session_start() function must be called first before using the session_destroy() function.
That is to say, the following code is required:
session_start();
session_destroy();
?>
Analysis
I still lack experience and lack of understanding of sessions. This error occurred, and I checked it later,
Before calling session_destroy(), you need to call session_start();
To tell the system that you currently have a session. Then close