php - A solution to enable mobile browsing to support sessions
伊谢尔伦
伊谢尔伦 2017-05-27 17:43:59
0
4
825

After the user successfully logs in, he goes to the main page, clicks to enter another page, and automatically jumps back to the login page to log in. What may be the reason? User information: There is a session after the user successfully logs in. This is a mobile website. It is probably caused by some mobile phones not supporting sessions. Is there any way to solve this problem?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(4)
过去多啦不再A梦

Find a few more test machines. In addition, Android webview requires permissions.

滿天的星座

In this case, you can put the sessionid in the URL as a parameter and pass it to the server, and use session_id() to forcefully specify the session id every time, but there will be security risks

phpcn_u1582

Session is saved on the server side, and there is no statement about whether the client supports it.
Generally, the session ID is stored in cookies. If the client does not support cookies, the session will be invalid.
I remember that PHP has a setting that can automatically put the session ID into the URL to solve the problem of the client closing cookies.
Related information here.
Good luck to you.

刘奇

You can use LocalStorage and SessionStorage instead of Cookie

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template