Thinkphp project background login problem, strange This post was finally edited by cjq001 at 2014-09-2815: 46: 40 thinkphp project, encountered a strange problem, Click login in the local environment, go to the background smoothly. after logging on to the Web site of the virtual space, you cannot enter the background. If no error is reported, the website remains in the logon window. after tracking, the following statement is executed: $ thinkphp project background login problem, strange
This post was last edited by cjq001 at 15:46:40
Thinkphp project encountered a strange thing,
Click "log on" in the local environment to go to the background;
For a website in a virtual space, after clicking log on, the website cannot enter the background, and no error is reported. after a flash, the website remains in the logon box;
After tracking, the following statements are also executed:
$this->display('login');
Local: execute this function:
public function login() {
However, in virtual space debugging, the above functions are not executed. Why is the same database and code? Please advise!
------ Solution ----------------------
I'm afraid this is not the login thing. let's look at the context.
------ Solution ----------------------
Is there any session code in your background? Remove the one and check whether it can be entered.
------ Solution ----------------------
What is the page jump code after you click log on?
------ Solution ----------------------
Clear the Runtime directory and try again
If
Public function logout (){
Will be executed, obviously you have the wrong url
Logout is logged out!
------ Solution ----------------------
Open a test page on the VM:
session_start();
if(empty($_SESSION['time'])){
$_SESSION['time'] = time();
}
echo $_SESSION['time'];
?>
Refresh the test page to see if there is any output time, and check if the time is changing.
If time is changing, your server has not configured the session.
------ Solution ----------------------
echo $_SESSION[C('SESSION_ADMIN_NAME') ? $_SESSION[C('SESSION_ADMIN_NAME') : "NULL";
?>
Let's take a look at the differences between the outputs in two environments.