index.php - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of index.php.php
- <?php
- $contentType = isset($_SERVER["CONTENT_TYPE"]) ? trim($_SERVER["CONTENT_TYPE"]) : '';
- if ($contentType === "application/json") {
- //Receive the RAW post data.
- $content = trim(file_get_contents("php://input"));
- $decoded = json_decode($content, true);
- //If json_decode failed, the JSON is invalid.
- if(! is_array($decoded)) {
- } else {
- // Send error back to user.
- }
- }
- ?>
File Description
- index.php
- PHP Code
- 27 Jan-2020
- 394 Bytes
You can Share it:
Latest PHP Pastes