Home > Backend Development > PHP7 > body text

What should I do if the session value cannot be successfully passed across pages in PHP7? (with solution)

藏色散人
Release: 2023-02-18 08:48:01
forward
2290 people have browsed it

Solution to the failure of cross-page transfer of session value in PHP7

Cause of failed transfer

session is stored on the server side, and php in PHP7. session.use_trans_sid = 0 in the ini configuration file, causing the transfer to fail. (As shown below)

What should I do if the session value cannot be successfully passed across pages in PHP7? (with solution)

Solution

Just set session.use_trans_sid =1. The modification method is as follows:

  • Find the php.ini file

  • Find it according to the PHP installation path of your computer, for example, mine is E:php7. 3.4nts\php.ini

  • Open the php.ini file, ① shortcut key ctrl h → ② enter: session.use_trans_sid → ③ change 0 to 1.

What should I do if the session value cannot be successfully passed across pages in PHP7? (with solution)

Recommended study: "PHP7 Tutorial"

The above is the detailed content of What should I do if the session value cannot be successfully passed across pages in PHP7? (with solution). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:juejin.im
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!