Created
January 22, 2015 13:55
-
-
Save danharper/cbaa28ea95be6b49983d to your computer and use it in GitHub Desktop.
downtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
http_response_code(503); | |
$message = 'Temporary application maintenance in progress. Please try again shortly.'; | |
if (isset($_SERVER['Content-Type']) && strpos($_SERVER['Content-Type'], 'json') !== false) | |
{ | |
header('Content-Type', 'application/json'); | |
echo json_encode(['error' => $message]); | |
} | |
else | |
{ | |
echo $message; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment