Added some base methods (utils)

master
Bofh 1 year ago
parent b889e008a4
commit 0b28014597

@ -1,5 +1,15 @@
<?php
function get_request_json() {
return @json_decode(file_get_contents('php://input'));
}
function unquote($text) {
$text = str_replace("'", "", $text);
$text = str_replace('"', '', $text);
return $text;
}
# HTTP result => JSON
function hres_json($code, $status, $message) {
header('Content-Type: application/json');

Loading…
Cancel
Save