PHP header(“Refresh”) problems

前端 未结 3 1044
再見小時候
再見小時候 2020-12-22 11:26

I have some code like:

header(\'Refresh: 15; url=\' . $url);

This works fine, except when people are visiting this url via Twitter (posted

3条回答
  •  遥遥无期
    2020-12-22 11:44

    Have you tired setting the location header instead, for example.

    $url = "http://www.example.com/";
    header("Location: " . $url);
    

提交回复
热议问题