From 81c7d21d1f8507deca3b01e7a21b9f58c18e0412 Mon Sep 17 00:00:00 2001 From: John Campbell Date: Wed, 22 Feb 2017 13:44:02 -0500 Subject: [PATCH] send the http response code for errors --- index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/index.php b/index.php index ee27721..5b01547 100644 --- a/index.php +++ b/index.php @@ -153,6 +153,7 @@ function get_absolute_path($path) { } function err($code,$msg) { + http_response_code($code); echo json_encode(['error' => ['code'=>intval($code), 'msg' => $msg]]); exit; }