PHP refresh window? equivalent to F5 page reload?

user840930 picture user840930 · Dec 2, 2011 · Viewed 125.4k times · Source

Is there anything in PHP that is the equivalent of manually pressing the F5 page reload button? My php script is in a frame and isn't the parent script but it needs to refresh the entire page and not just it's frame.

Answer

NewProger picture NewProger · Dec 15, 2012

Actually it is possible:

Header('Location: '.$_SERVER['PHP_SELF']);
Exit(); //optional

And it will reload the same page.