R3m/framework Function reference header

{header(String $string, Int $http_response_code, Bool $replace=true)}

header() is used to send a raw HTTP header.
See the ยป HTTP/1.1 specification for more information on HTTP headers.

Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP.
It is a very common error to read code with include, or require, functions, or another file access function, and have spaces or empty lines that are output before header() is called.
The same problem exists when using a single PHP/HTML file.

More information:


Last modified: 2021-06-07

© 2021 universeorange.com