Created
May 7, 2019 03:57
-
-
Save dgreen/b2bcd6d7eebfe0c5297ce31ee5b17596 to your computer and use it in GitHub Desktop.
Simple PHP script to show data available to it
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Displaying results of activation</title> | |
</head> | |
<body> | |
<h1>Results of Activation</h1> | |
<?php | |
if (! empty($_GET)) { | |
echo "<h2>Parameters submitted by HTTP GET</h2>"; | |
echo "<pre><code>\n"; | |
foreach($_GET as $key => $value) { | |
echo "$key = $value\n"; | |
} | |
echo "</code></pre>"; | |
} | |
if (! empty($_POST)) { | |
echo "<h2>Parameters submitted by HTTP POST</h2>"; | |
echo "<pre><code>\n"; | |
foreach($_POST as $key => $value) { | |
echo "$key = $value\n"; | |
} | |
echo "</code></pre>"; | |
} | |
if (! empty($_SERVER)) { | |
echo "<h2>Parameters from web server</h2>"; | |
echo "<pre><code>\n"; | |
foreach($_SERVER as $key => $value) { | |
echo "$key = $value\n"; | |
} | |
echo "</code></pre>"; | |
} | |
if (! empty($_ENV)) { | |
echo "<h2>Server's Environmental Variables</h2>"; | |
echo "<pre><code>\n"; | |
foreach($_ENV as $key => $value) { | |
echo "$key = $value\n"; | |
} | |
echo "</code></pre>"; | |
} | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment