Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Simple cgi problem/w2k

From: al:bri:xtra at: 3-Jan-2002 10:18

I'm using the Xitami as a personal web server on Windows XP and use this line in my CGI rebol scripts: #! c:\Rebol\View\rebol.exe -cs Note the space after the "#!" and the use of DOS "\". My HTML code (%Test.html) that calls the CGI rebol script looks like this: <html> <body> <form action="http://localhost/cgi-bin/Test.r" method="POST"> <h1>CGI Emailer</h1> <hr> Please enter your email address:<p> <input type="TEXT" name="email" size="30"> <p> <textarea name="message" rows="7" cols="35"> Enter message here. </textarea> <p> <input type="SUBMIT" value="Submit"> </form> </body> </html> My %Test.r script (it's in the CGI-BIN directory) looks like: #! c:\Rebol\View\rebol.exe -cs Rebol [ Name: 'Test Title: "Test" ] print ["Content-Type: text/html^/"] data: make string! 10000 cgi: make object! decode-cgi any [system/options/cgi/query-string ] foreach line any [copy system/ports/input ""] [ repend data [line newline] ] print [ <html><head><title> rebol/script/Title </title></head><body> {Time: } now/time <br> {Here is the posted data:} <hr><pre>data</pre> <hr> {Here is the CGI contents:} <hr> <pre>mold cgi</pre> </body></html> ] And it works from a url like: http://localhost/Test.html So give that a try to see if it works for you. Andrew Martin ICQ: 26227169 http://valley.150m.com/