|
Pages: [1]
|
 |
|
Author
|
Topic: "picking" a value from the CGI object... (Read 347 times)
|
|
jfdutcher
|
The brief script below wants to exercise the script from the script library as a CGI script on the server. So far, no attempted use of the term "cgi/:name" satisfys the script line " file: to-file cgi/:name " without getting an error. This term does work when simply "printing" the "cgi/:name" as shown. What change can satisfy "to-file" so that I can re-write the file on the server and alter end-of-line characters  #!rebol.exe -cs REBOL [] print {Content-Type: text/html} ;-- Required Page Header print " " print " " cgi: make object! decode-cgi system/options/cgi/query-string ;file: to-file cgi/:name ;write file read file foreach name next first cgi [print [name "is" <B> cgi/:name </B><P>]] print [</body><html>]
|
|
|
|
|
Logged
|
|
|
|
|
|
|
jfdutcher
|
Thanks for the input....in thinking about the error of my ways today I came up with this change to the script....which works fine now.......as you would have guessed.
John D.
#!rebol.exe -cs REBOL [] print {Content-Type: text/html} ;-- Required Page Header print " " print " " cgi: make object! decode-cgi system/options/cgi/query-string file: to-file cgi/filename write file read file print ["Filename: " <B> cgi/filename </B> "was rewritten"<P>] print [</body><html>]
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |