SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 740 | Next

David A. Karp

"Windows Vista Annoyances: Tips, Secrets, and Hacks"

Environment("Process")
Environment = EnvHandle(EnviroName)
End Function
540 | Chapter 9: Scripting and Automation
For example, you display the user??™s web browser version with this short
script:
WScript.Echo "Your browser's signature is:"
WScript.Echo Environment("HTTP_USER_AGENT")
Some other useful environment variables include QUERY_STRING (for retrieving
form input or any text after a question mark in the URL) and HTTP_COOKIE
(for reading HTTP cookies).
You can, of course, use other routines in your CGI scripts. For example,
here??™s a script that displays the contents of a text file, using the ReadFromFile
function (see ???How to Manipulate Files,??? earlier in this chapter):
OrderNum = "234323"
WScript.Echo "Here is your order (number " & OrderNum & "):"
WScript.Echo "

"
WScript.Echo "
"
WScript.Echo ReadFromFile("d:\data\orders\" & OrderNum & ".txt")
Note the use of HTML to include an image in the output. Although many
HTML tags require quotation marks, adding a quotation mark in the middle
of a line would cause WSH to confuse it with the beginning and trailing
quotes. To tell VBScript to treat a quotation mark as a character to print,
just put two of them together (as shown on the ???smiley??? line).
Decipher Script Errors
One of the general disadvantages of scripts is that they are typically created
with a plain-text editor, rather than a rich debugging environment used with
more sophisticated programming languages (see ???Find a Better Editor,??? later
in this chapter).


Pages:
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752

hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6