enable_view_json
enable_view_json($enable=true,$refresh=true); - allow or prohibit downloading and displaying JSON content (files in json format) in the browser (if this option is disabled, such files will try to be downloaded to the local disk).
You can use this function to check whether JSON is allowed or forbidden in the browser is_enable_view_json.
the input Function accepts parameters:
$enable – allow (true) or deny (false)$refresh – should the page be updated (true) or not (false) after this command
After testing, the function returns the result of its work to the script :
true – completed successfully
false – failed