Php: Warning: Header may not contain more than a single header, new line detected in

后端 未结 1 2024
盖世英雄少女心
盖世英雄少女心 2021-01-29 16:28

its unbeliveable. This is all I got, at the very first file which is executed:

header (\"Pragma: public\\r\\nExpires: 0\");die;

and the error?

1条回答
  •  醉话见心
    2021-01-29 16:32

    What is unclear about the error?

    You have a new line here:

    \r\n
    

    You are trying to set two headers. You need two header() statements instead of one with a line break in the string.

    header("Pragma: public");
    header("Expires: 0");
    die();
    

    0 讨论(0)
提交回复
热议问题