Skip to content

Instantly share code, notes, and snippets.

@dduleone
Created May 26, 2016 16:32
Show Gist options
  • Save dduleone/26e33266265ff3304d82381055c02a9c to your computer and use it in GitHub Desktop.
Save dduleone/26e33266265ff3304d82381055c02a9c to your computer and use it in GitHub Desktop.
Display PHP Request Data
<?php
header('content-type: application/json');
session_start();
$data = array(
// 'GLOBALS' => $GLOBALS,
'_SERVER' => $_SERVER,
'_GET' => $_GET,
'_POST' => $_POST,
'_FILES' => $_FILES,
'_COOKIE' => $_COOKIE,
'_SESSION' => $_SESSION,
'_REQUEST' => $_REQUEST,
'_ENV' => $_ENV,
);
echo json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment