Why can I skip login

Source: Internet
Author: User
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?
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
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
Judge with $_session.
If there is a value on the landing, no login is not allowed
You have to be on each page to determine if there is a session ah, after the successful landing session.
 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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.