Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 20, 2019 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/94fc40e4e4bfca25acab8a528e6e7e6f to your computer and use it in GitHub Desktop.
Save parzibyte/94fc40e4e4bfca25acab8a528e6e7e6f to your computer and use it in GitHub Desktop.
<?php
/*
@author parzibyte
*/
move_uploaded_file($_FILES["archivo"]["tmp_name"], "post.json");
echo json_encode(
[
"metodo" => $_SERVER["REQUEST_METHOD"],
"encabezados" => getallheaders(),
"datos" => file_get_contents("php://input"),
"files" => $_FILES,
"post" => $_POST,
"cadena_consulta" => $_GET
],
JSON_PRETTY_PRINT
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment