Simply send the status code as a response header():
header('HTTP/1.1 500 Internal Server Error');
Remember that when sending this there must not be any output before it. That means no echo calls and no HTML or whitespace.
Simply send the status code as a response header():
header('HTTP/1.1 500 Internal Server Error');
Remember that when sending this there must not be any output before it. That means no echo calls and no HTML or whitespace.