How can I set a cookie and then redirect in PHP?

后端 未结 5 975
孤街浪徒
孤街浪徒 2020-11-29 06:19

After doing a bit of processing, I want to set a cookie value to user input and then redirect them to a new page. However, the cookie is not getting set. If I comment out

5条回答
  •  醉酒成梦
    2020-11-29 07:05

    I'm assuming you are running IIS? There is a know bug with IIS versions less than 7 when attempting to both set a cookie and a location header in the same request.

    http://support.microsoft.com/kb/q176113/

提交回复
热议问题