HTTP::redirect

HTTP::redirect

HTTP::redirect -- redirects the client

Description

This function redirects the client. This is done by issuing a Location: header and exiting.

Parameter

  • string $url - the new URL, where to client should be redirected to.

Note

This function can be called statically.

Avoid sending any kind of data to the client before calling redirect().

The location header requires an absolute URL. If not given, redirect() tries to build one from $url. So if the redirect fails, set the absolute URL manually as argument.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.