After moving from the test environment to the formal environment, the session has no value and a logon page is created. different la s are displayed at the top of the page based on the logon status. After logging on to the system before login, the results of the Test environment are displayed based on the session value, and the operation is normal. However, after I moved to the official environment, after logging in, I still displayed the first image, login and registration. After I move the implementation method from the test environment to the formal environment, the session has no value.
On the login page, different la s are displayed at the top of the page based on the login status.
Before login
After login, the session value is displayed
This is the effect of the test environment, and there is no problem with running.
However, after I moved to the official environment, after logging in, I still displayed the first image, login and registration.
In reality, php is embedded in header.html to determine how to output html code based on the value of session ['username.
The session value is in the login interface, that is, login. php.
If (isset ($ _ SESSION ['username'])
{
Echo "";
Echo"
";
Echo "log on to". $ _ SESSION ['username']. "";
}
Else
{
Echo "";
Echo"
";
}
?>
Note: the test environment is XP, and the official environment is server03. share:
------ Solution --------------------
Session_start ();