Skip to content

Instantly share code, notes, and snippets.

@greg-randall
Created February 15, 2022 18:58
Show Gist options
  • Select an option

  • Save greg-randall/b6dbcb64c90b78c3e17efba19ff9ad61 to your computer and use it in GitHub Desktop.

Select an option

Save greg-randall/b6dbcb64c90b78c3e17efba19ff9ad61 to your computer and use it in GitHub Desktop.
Save output from get/post for testing.
<?php
$data = "\n---------------------------------------------------------------------\nRaw Input:\n" . file_get_contents("php://input");
$data .= "\n\nGet:\n". print_r($_GET,true);
$data .= "\nPost:\n". print_r($_POST,true);
file_put_contents( "log-output-test.txt", $data , FILE_APPEND | LOCK_EX );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment