


Session life and cross-domain and cross-page --- small doubts and big problems (php)
The session disappears after crossing the page?
Points to note when storing sessions:
- Stored on the server side in the form of files.
- Limited life cycle, determined according to different server types.
- Storage content as serialized string
The content format stored in the session file is as follows:
We can read some session information from the picture: for example
There is a session with error and its value is empty; there is also a session with step and its value is 0, and so on.
Now that we know the principle mechanism of session, then, in order for session to be called across pages, several conditions must be met:
1. Turn on session.use_trans_sid, that is, find session.use_trans_sid
in the php configuration file php.ini and then change its value to 1 and remove the comment,
2. Since it is stored in the form of a file, the directory where the session file is saved must always exist and be writable. You can view the session information through phpinfo()
. The directory where session files are saved session.save_path.
Finally, restart php-fmt.
*Attach a screenshot of the session information at the end:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
