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.