tilde/cgi-bin/test.cgi

23 lines
472 B
Bash
Executable File

#!/bin/bash
echo "Content-type: text/html"
echo ""
echo "<html>"
echo "<head>"
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"
echo "<title>Bash CGI script</title>"
echo "</head>"
echo "<body>"
echo "<p>Hello, Your IP address is $REMOTE_ADDR</p>"
echo "<p>the script filename is <pre>$SCRIPT_FILENAME</pre></p>"
echo "<p>the script name is <pre>$SCRIPT_NAME</pre></p>"
echo "<pre>"
env
echo "</pre>"
echo "</body>"
echo "</html>"
exit 0