In php, if the session is used to determine whether the user is logged in and log out, this can be done:
session_start();
session_destroy();
The session means that it has ended. The next sentence should be written to js to make the page jump.
<script>alert("Login already!");="";</script>
If it is a frame page, don't use location directly. Because this will jump in a small frame page, the original intention must be to jump in the entire frame. Therefore, "parent." should be added before the location.
The entire process is as follows (only for framework pages):
Copy the codeThe code is as follows:
<?php
session_start();
session_destroy();
//To make the entire page of the framework jump to the login page
echo "<script>alert('Logined out');='';</script>";
?>