5件ヒット
[1-5件を表示]
(0.020秒)
種類
- インスタンスメソッド (2)
- 特異メソッド (2)
- 定数 (1)
キーワード
-
HTTP
_ STATUS (1) - escape (1)
- header (1)
- out (1)
- unescape (1)
検索結果
先頭5件
-
CGI
:: HTTP _ STATUS -> Hash (18355.0) -
HTTP のステータスコードを表すハッシュです。
HTTP のステータスコードを表すハッシュです。 -
CGI
# header(options = "text / html") -> String (106.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
...HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。
CGI#out を使わずに自力で HTML を出力したい場合などに使います。
このメソッドは文字列エンコーディングを変換しません。
ヘッダのキ......効期限を Time のインスタンスで指定します。
Expires ヘッダに対応します。
: cookie
クッキーとして文字列か CGI::Cookie のインスタンス、またはそれらの配列かハッシュを指定します。
一つ以上の Set-Cookie ヘッダに対応しま......e" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"})
例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis", "status" => "OK"})
print "<html><head><title>TITLE</title></head>\r\n"
pri... -
CGI
# out(options = "text / html") { . . . . } (88.0) -
HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。
...P ヘッダを生成するための情報を指定します。
例:
cgi = CGI.new
cgi.out{ "string" }
# Content-Type: text/html
# Content-Length: 6
#
# string
cgi.out("text/plain"){ "string" }
# Content-Type: text/plain......tml; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 * 24 * 30),
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"}){ "string" }
@see CGI#header... -
CGI
. escape(string) -> String (76.0) -
与えられた文字列を URL エンコードした文字列を新しく作成し返します。
...string URL エンコードしたい文字列を指定します。
例:
require "cgi"
p CGI.escape('@##') #=> "%40%23%23"
url = "http://www.example.com/register?url=" +
CGI.escape('http://www.example.com/index.rss')
p url
#=> "http://www.example... -
CGI
. unescape(string) -> String (40.0) -
与えられた文字列を URL デコードした文字列を新しく作成し返します。
...しく作成し返します。
@param string URL エンコードされている文字列を指定します。
require "cgi"
p CGI.unescape('%40%23%23') #=> "@##"
p CGI.unescape("http%3A%2F%2Fwww.example.com%2Findex.rss")
#=> "http://www.example.com/index.rss"...