php
Set HTTP response code in php
<?php
$status_code = 201;
http_response_code($status_code);
?>
If you want to set response status code header in PHP, you can do that using http_response_code($status_code) function. This will return the status code from the HTTP request.
You can get information about status codes from below link
Was this helpful?
Similar Posts