search

Home  >  Q&A  >  body text

In thinkPHP, under the same controller, the Session set by method A cannot be obtained by method B.

LAMP environment,
thinkPHP, under the same controller, the Session set by method A cannot get the value by method B. Why is this?

Supplementary Note: The WAMP environment for local testing is OK.

PHPzPHPz2747 days ago788

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-05-24 11:34:10

    The first possibility is that the Window and Linux tp versions do not correspond.
    The second problem is the case problem. Window is not case-sensitive, but Linux strictly respects case. Check if the upper and lower case of your variables do not correspond to each other. The third option is to prohibit Session in the Linux environment (low possibility). I think the second option is more likely.

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-24 11:34:10

    Environment difference. Session is not opened. Need to check the configuration

    Ps:在Linux上面尤其需要注意大小写的问题

    reply
    0
  • Cancelreply