Ruby初心者スレッドPart4
■ このスレッドは過去ログ倉庫に格納されています
0058前スレ951
2006/01/25(水) 03:29:03Cookieの受け渡しをCGIクラスを使って行いたいのですが
enctypeをmultipartにすると動作しません
どこが間違っているのでしょうか?
環境:
Windows 2000
ruby 1.8.2 (2004-12-25) [i386-cygwin]
AN HTTP Daemon Version 1.42n
--
require "cgi"
cgi = CGI.new
cookie1 = CGI::Cookie::new({ 'name' => "name", 'value' => ["value"], 'expires' => Time.now + 1000 })
cgi.out({"cookie" => [cookie1]}){""}
print "Content-type: text/html\n\n"
p cgi.cookies['name']
print <<EOF
<html>
<body>
<form action=#{File.basename(__FILE__)} method=post enctype=multipart/form-data>
<input type=submit value=multipart>
</form>
<form action=#{File.basename(__FILE__)} method=post enctype=text/plain>
<input type=submit value=text>
</form>
</body>
</html>
EOF
--
※少し修正
■ このスレッドは過去ログ倉庫に格納されています