httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1387439 - /httpd/httpd/trunk/docs/cgi-examples/printenv.vbs
Date Wed, 19 Sep 2012 03:04:53 GMT
Author: fuankg
Date: Wed Sep 19 03:04:53 2012
New Revision: 1387439

URL: http://svn.apache.org/viewvc?rev=1387439&view=rev
Log:
Added VBScript CGI sample for Windows.

Added:
    httpd/httpd/trunk/docs/cgi-examples/printenv.vbs   (with props)

Added: httpd/httpd/trunk/docs/cgi-examples/printenv.vbs
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/cgi-examples/printenv.vbs?rev=1387439&view=auto
==============================================================================
--- httpd/httpd/trunk/docs/cgi-examples/printenv.vbs (added)
+++ httpd/httpd/trunk/docs/cgi-examples/printenv.vbs Wed Sep 19 03:04:53 2012
@@ -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
+

Propchange: httpd/httpd/trunk/docs/cgi-examples/printenv.vbs
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message