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

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

藏色散人
藏色散人forward
2021-11-03 17:02:082211browse

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!

Statement:
This article is reproduced at:juejin.im. If there is any infringement, please contact admin@php.cn delete