22 lines
382 B
PHP
22 lines
382 B
PHP
<?php
|
|
|
|
require_once("_errors.php");
|
|
|
|
function ReturnJSONData ($arr) {
|
|
$data = json_encode($arr);
|
|
if (!$data) {
|
|
$data = json_encode(array("error" => $Err_Int_JSONEncodeError));
|
|
}
|
|
header("Content-Type: application/json; charset=utf-8");
|
|
echo $data;
|
|
exit;
|
|
}
|
|
|
|
function ReturnJSONError ($err, $desc) {
|
|
ReturnJSONData(array(
|
|
"error" => $err,
|
|
"description" => $desc
|
|
));
|
|
}
|
|
|
|
?>
|