Why can i skip login?
Younger brother Novice:
I was originally through the login, and then location to mainframe.html, but I on the Web site directly input: http://............//Mainframe.html can also enter, ask you elder brother, how to deal with Ah, To go to mainframe.html before you have to log in?
------Solution--------------------
When you log in, save the login information to the session, after jumping to mainframe.html, take out the data in the session to judge the line
------Solution--------------------
If you do not want to enter mainframe.html directly, you need to check in mainframe.html
However, mainframe.html cannot execute server-side scripts
------Solution--------------------
Judge with $_session.
If there is a value on the landing, no login is not allowed
------Solution--------------------
You have to be on each page to determine if there is a session ah, after the successful landing session.
------Solution--------------------
Session_Start ();
if (! isset ($_session [' username '])) {
/*header ("Location:index.php"); */
$url = "index.html";
echo "
";
Exit ();
}
?>
After you log in the page to jump to add this code, to determine whether the session exists, does not exist to jump back to the landing page