芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/status.pulsehost.co.uk/app/core/Response.php
$message, 'status' => $status, 'details' => $details, ] ); die(); } /* jsonapi.org */ public static function jsonapi_success($data, $meta = null, $response_code = 200, $others = null) { http_response_code($response_code); $response = [ 'data' => $data ]; if($meta) { $response['meta'] = $meta; }; if($others) { $response = array_merge($response, $others); } echo json_encode($response); die(); } public static function jsonapi_error($errors, $meta = null, $response_code = 400) { http_response_code($response_code); $response = [ 'errors' => $errors ]; if($meta) { $response['meta'] = $meta; }; echo json_encode($response); die(); } public static function simple_json($response) { echo json_encode($response); die(); } }