phpasp.net

Code Translation: ASP.NET Server.Transfer in PHP


How would I do this in PHP?

Server.Transfer("/index.aspx")

(add ';' for C#)

EDIT:

It is important to have the URL remain the same as before; you know, for Google. In my situation, we have a bunch of .html files that we want to transfer and it is important to the client that the address bar doesn't change.


Solution

  • As far as I know PHP doesn't have a real transfer ability, but you could get the exact same effect by using include() or require() like so:

    require_once("/index.aspx");