Related Functions

http_response_code

PHP 5.4.0+

Gets or sets the HTTP response status code for the current request, providing a convenient way to control server response codes without manually crafting headers.

Description

The http_response_code() Gets or sets the HTTP response status code for the current request, providing a convenient way to control server response codes without manually crafting headers.

Example