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

PHP session cannot be obtained across multiple pages

WBOY
Release: 2016-10-11 14:23:13
Original
1793 people have browsed it

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) ;

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template