Skip to content

Instantly share code, notes, and snippets.

@AFelipeTrujillo
Last active September 11, 2015 22:43
Show Gist options
  • Save AFelipeTrujillo/1f5a3ee33698d3e5a80f to your computer and use it in GitHub Desktop.
Save AFelipeTrujillo/1f5a3ee33698d3e5a80f to your computer and use it in GitHub Desktop.
Create a json response with 500 error
header('Content-Type: application/json; charset=utf-8', true, 500);
print json_encode(array('hasErrorCreate' => true, 'data' => 1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment