PHP session destroyed / lost after header

前端 未结 6 2049
无人共我
无人共我 2020-12-10 02:39

I\'ve got a script that sets some session values before redirecting to / using header().

I\'ve read many posts about the $_SESSION

6条回答
  •  执笔经年
    2020-12-10 03:28

    After the Header redirect you need to exit the PHP script:

    header("Location: /");
    exit();
    

提交回复
热议问题