How dynamic pages are statically based on the login information of different users

Source: Internet
Author: User
How do dynamic pages be statically based on the login information of different users?
Great gods, recently in the study of dynamic website static problem. is a index.php page, a template PHP page generated by the index.shtml page.

Code for the index.php page:
 
 
Ob_start ();
Include_once (' templ.dwt.php ');
File_put_contents (' index.shtml ', ob_get_contents ());

Header ("Location:./index.shtml");
?>

But I think of a problem: such a static page generated, if there is a login at the top of the page to display the user name of the current user information, using such a static page, when other users access, access to the previous index.shtml, then you will see other user information ... So how do you implement a static page?

We also know that a dynamic page for spiders will not be included, and static pages made of how to display their own user name for different users?
------to solve the idea----------------------
HTML displays blank at login information, Ajax requests login status after page loading, and then complements content
------to solve the idea----------------------
In general, the use of Ajax for login verification, and then assemble the display effect.
  • 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.