PHP session variable changes between pages

后端 未结 4 1942
一个人的身影
一个人的身影 2021-01-06 04:09

I have a session variable that I set like this:



        
4条回答
  •  一向
    一向 (楼主)
    2021-01-06 04:44

    The only solution I can think of is that you are making a second request to the first page without knowing it. You should probably check your apache access log for this second access...

    Making a simple request counter would be another solution to check this:

    $_SESSION['counter'] = isset($_SESSION['counter'])? $_SESSION['counter'] +1 : 0;
    

提交回复
热议问题