Code Translation: ASP.NET Server.Transfer in PHP

后端 未结 3 658
花落未央
花落未央 2020-12-21 06:11

How would I do this in PHP?

Server.Transfer(\"/index.aspx\")

(add \';\' for C#)

EDIT:

It is important to h

3条回答
  •  北海茫月
    2020-12-21 07:05

    The easiest way is to use a header redirect.

    header('Location: /index.php');
    

    Edit: Or you could just include the file and exit if you don't want to use HTTP headers.

提交回复
热议问题