diff --git a/README.md b/README.md index 25f81e6..5aaa2fb 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ =============== -* [cgi](../../pages/experi/kari.html) \ No newline at end of file +* [cgi](../../pages/mycgi/btype.html) \ No newline at end of file diff --git a/experi/kari.html b/experi/kari.html index 36b1378..be167c1 100644 --- a/experi/kari.html +++ b/experi/kari.html @@ -1,7 +1,6 @@ - - 購入ページ +

氏名: diff --git a/experi/kari.rb b/experi/kari.rb old mode 100644 new mode 100755 diff --git a/mycgi/.htaccess b/mycgi/.htaccess new file mode 100644 index 0000000..395f3ff --- /dev/null +++ b/mycgi/.htaccess @@ -0,0 +1,3 @@ +AddHandler cgi-script .rb +Options +ExecCGI +AddType "text/html; charset=utf-8" .html \ No newline at end of file diff --git a/mycgi/btype.html b/mycgi/btype.html new file mode 100644 index 0000000..a17ecff --- /dev/null +++ b/mycgi/btype.html @@ -0,0 +1,22 @@ + + +血液型占いダ + + +

血液型を入れよ

+ + + +

お名前:
+血液型:
+ +

+
+ + + \ No newline at end of file diff --git a/mycgi/btype.rb b/mycgi/btype.rb new file mode 100644 index 0000000..8c12bd4 --- /dev/null +++ b/mycgi/btype.rb @@ -0,0 +1,21 @@ +#!/usr/bin/env ruby +# coding: utf-8 + +require 'cgi' +require 'kconv' +c = CGI.new(:accept_charset => "binary") +print "Content-type: text/html; charset=UTF-8\n\n" + +name = c["namae"].toutf8 +bt = c["blood"].toutf8 + +print " + +Blood type +\n" + +print "

#{name}さんの血液型

\n" + +print "

#{name}さんは#{bt.upcase}型ですね!

\n" +print "\n" +print "\n" \ No newline at end of file