Home >Backend Development >PHP Tutorial >PHP session cannot be obtained across multiple pages

PHP session cannot be obtained across multiple pages

WBOY
WBOYOriginal
2016-10-11 14:23:131794browse

The session is open, and so is the session_id(). Even after printing it twice, it’s the same. What’s going on?

Reply content:

The session is open, and so is the session_id(). Even after printing it twice, it’s the same. What’s going on?

Note to the original poster:
1. Make sure each script page calls session_start() before outputting at the top;
2. Make sure the two pages opened are in the same browser (session is related to browser cookies and cannot cross browsers) ;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn