情報学部 | 菅沼ホーム | 目次 | 索引 |
#!/usr/bin/ruby $KCODE = "UTF8" printf "Content-type: text/html\n\n" printf "<HTML>\n" printf "<HEAD>\n" printf " <TITLE>CGIB の例</TITLE>\n" printf " <LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"../../../master.css\">\n" printf "</HEAD>\n" printf "<BODY CLASS=\"white\">\n" while line = gets printf "%s<BR>\n", line end printf "</BODY>\n" printf "</HTML>\n"
name=菅沼 義昇 sex=Male v1=on v3=on list=蜜柑 list=葡萄
name=%90%9B%8F%C0+%8B%60%8F%B8&sex=Male&v1=on&v3=on&list=%96%A8%8A%B9&list=%95%92%93%B8
#!/usr/bin/ruby $KCODE = "UTF8" printf "Content-type: text/html\n\n" printf "<HTML>\n" printf "<HEAD>\n" printf " <TITLE>CGIB の例</TITLE>\n" printf " <LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"../../../master.css\">\n" printf "</HEAD>\n" printf "<BODY CLASS=\"white\">\n" require "cgi" cgi = CGI.new p cgi printf "<BR>\n" p cgi['name'] printf "<BR>\n" i = 0 while i < 5 print cgi['list'][i], " " i += 1 end printf "<BR>\n" p cgi.params printf "<BR>\n" printf "</BODY>\n" printf "</HTML>\n"
#["菅沼 義昇"], "list"=>["蜜柑", "葡萄"], "v1"=>["on"], "sex"=>["Male"], "v3"=>["on"]}, @cookies={}, @output_hidden=nil> "菅沼 義昇" 蜜柑 葡萄 nil nil nil {"name"=>["菅沼 義昇"], "list"=>["蜜柑", "葡萄"], "v1"=>["on"], "sex"=>["Male"], "v3"=>["on"]}
#["菅沼 義昇\r\nsex=Male\r\nv1=on\r\nv3=on\r\nlist=蜜柑\r\nlist=葡萄\r\n"]}, @cookies={}, @output_hidden=nil> "菅沼 義昇\r\nsex=Male\r\nv1=on\r\nv3=on\r\nlist=蜜柑\r\nlist=葡萄\r\n" nil nil nil nil nil {"name"=>["菅沼 義昇\r\nsex=Male\r\nv1=on\r\nv3=on\r\nlist=蜜柑\r\nlist=葡萄\r\n"]}
情報学部 | 菅沼ホーム | 目次 | 索引 |