summaryrefslogtreecommitdiffstats
path: root/docs/cgi-examples
diff options
context:
space:
mode:
authorGuenter Knauf <fuankg@apache.org>2012-09-19 05:04:53 +0200
committerGuenter Knauf <fuankg@apache.org>2012-09-19 05:04:53 +0200
commit3ad727964ec7047aa7d8cdac9fe9f35bb375c6ff (patch)
treea9e129ea8d06abfa023c9e893796064359d5211e /docs/cgi-examples
parentWhoups?! (diff)
downloadapache2-3ad727964ec7047aa7d8cdac9fe9f35bb375c6ff.tar.xz
apache2-3ad727964ec7047aa7d8cdac9fe9f35bb375c6ff.zip
Added VBScript CGI sample for Windows.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1387439 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/cgi-examples')
-rw-r--r--docs/cgi-examples/printenv.vbs24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/cgi-examples/printenv.vbs b/docs/cgi-examples/printenv.vbs
new file mode 100644
index 0000000000..b7e480d45e
--- /dev/null
+++ b/docs/cgi-examples/printenv.vbs
@@ -0,0 +1,24 @@
+'!c:/windows/system32/cscript -nologo
+'#
+'# printenv -- demo CGI program which just prints its environment
+'#
+Option Explicit
+
+Dim objShell, objArray, str, env
+Set objShell = CreateObject("WScript.Shell")
+Set objArray = CreateObject("System.Collections.ArrayList")
+
+Wscript.Echo "Content-type: text/plain; charset=iso-8859-1" & vbLF
+For Each str In objShell.Environment("PROCESS")
+ env = Split(str, "=", 2)
+ env(1) = Replace(env(1), vbLF, "\n")
+ objArray.Add env(0) & "=" & Chr(34) & env(1) & Chr(34)
+Next
+objArray.Sort()
+For Each str In objArray
+ WScript.Echo str
+Next
+
+'WScript.Echo ScriptEngine & " Version=" & ScriptEngineMajorVersion & "." & _
+' ScriptEngineMinorVersion & "." & ScriptEngineBuildVersion
+