るりまサーチ

最速Rubyリファレンスマニュアル検索!
60件ヒット [1-60件を表示] (0.071秒)

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub

クラス

モジュール

キーワード

検索結果

CGI#print(*strings) (219.0)

@todo

...@todo

引数の文字列を標準出力に出力します。
cgi.print は $DEFAULT_OUTPUT.print と等価です。

例:
cgi = CGI.new
cgi.print "This line is a part of content body.\r\n"...

CGI#header(options = "text/html") -> String (217.0)

HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。

...--> "501 Method Not Implemented"
"BAD_GATEWAY" --> "502 Bad Gateway"
"VARIANT_ALSO_VARIES" --> "506 Variant Also Negotiates"

@
param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。

例:
header
# Content-Type...
...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"
print "<body>BODY</body></html>\r\n"

@
see 35911...

CGI#accept_charset -> String (211.0)

受けとることができるキャラクタセットを文字列で返します。 デフォルトは UTF-8 です。

...受けとることができるキャラクタセットを文字列で返します。
デフォルトは UTF-8 です。

@
see CGI.accept_charset, CGI.accept_charset=...

CGI#out(options = "text/html") { .... } (75.0)

HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。

...

@
param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。

例:
cgi = CGI.new
cgi.out{ "string" }
# Content-Type: text/html
# Content-Length: 6
#
# string

cgi.out("text/plain"){ "string"...
...}
# Content-Type: text/plain
# Content-Length: 6
#
# string

cgi.out({"nph" => true,
"status" => "OK", # == "200 OK"
"server" => ENV['SERVER_SOFTWARE'],
"connection" => "close",...
...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::QueryExtension#[](key) -> Array (21.0)

文字列 key に対応するパラメータを配列で返します。 key に対応するパラメータが見つからなかった場合は、nil を返します。(CGI#paramsと等価です)

...パラメータが見つからなかった場合は、nil を返します。(CGI#paramsと等価です)

フォームから入力された値や、URL に埋め込まれた QUERY_STRING のパース結果の取得などに使用します。

@
param key キーを文字列で指定します。...

絞り込み条件を変える