O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

header

Synopsis

void header(string header[, bool replace [, int http_response_code ]] )

Sends header as a raw HTTP header string; must be called before any output is generated (including blank lines—a common mistake). If the header is a Location header, PHP also generates the appropriate REDIRECT status code. If replace is specified and false, the header does not replace a header of the same name; otherwise, the header replaces any header of the same name.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required