Set HTTP response code

Uses either http_response_code() or header() to set HTTP response code. Read more.

php
fork add to bundle source
function set_response_code($code, $status = "OK") { if ( function_exists('http_response_code') ) { http_response_code($code); } else { header("HTTP/1.1 {$code} {$status}"); } }

usage

load_function('set_response_code'); set_response_code(404, 'Not found');
← how to use this in app?
create log ...inout