Redirect to specified URL on PHP script completion?

后端 未结 7 1075
逝去的感伤
逝去的感伤 2020-12-13 08:57

How can I get a PHP function go to a specific website when it is done running?

For example:



        
7条回答
  •  孤城傲影
    2020-12-13 09:34

    Note that this will not work:

    header('Location: $url');
    

    You need to do this (for variable expansion):

    header("Location: $url");
    

提交回复
热议问题