PHP code example of hoku-lib / httpstatuscoderesolver
1. Go to this page and download the library: Download hoku-lib/httpstatuscoderesolver library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hoku-lib / httpstatuscoderesolver example snippets
php
odeInfo = \HttpStatusCodeResolver\HttpStatusCode::resolve(400);
php
tusCodeResolver\HttpHeader::http_response_code(403);
php
ponse_code(987);
// -> HTTP/1.1 500 Internal Server Error
// Oh my God!!!!
// PHP converts the status code to 500...
php
tusCodeResolver\HttpHeader::http_response_code(987, 'MyOriginalCode');
// -> HTTP/1.1 987 MyOriginalCode
// Yay! Happy!
->