Hello All:

As a CGI programmer writing in C++, I use
a CGI Object to test whether or not there is
a server present (the SERVER_NAME environment
variable). If a server name is not present, my
CGI application redirect output (content) to
a text file. This enables me to test the application
from the console. This is often convenient for me.

How may I do this in Rebol?

Consider the following code: How may I test
for a a server, and if not present redirect
that content to a text file?
; code follows:

;If not server_name open port or file, call it hello-world.htm
print "Content-Type: text/html^/"
print "<HTML><head><title>Hello world!</title></head>"
print "<body bgcolor=^"#FFFFFF^"><h1>Hello world!</h1>"
print "</body></html>^/"
;If port or file opern, close port or file

Thanks in advance!! You guys are always helpful.
Tim

Reply via email to