Redirect to specified URL on PHP script completion?

后端 未结 7 1074
逝去的感伤
逝去的感伤 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:54

    Here's a solution to the "headers were already sent" problem. Assume you are validating and emailing a form. Make sure the php code is the first thing on your page... before any of the doctype and head tags and all that jazz. Then, when the POST arrives back at the page the php code will come first and not encounter the headers already sent problem.

提交回复
热议问题