るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.035秒)
トップページ > バージョン:2.6.0[x] > クエリ:IO[x] > クエリ:u[x] > クラス:CGI[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io each_line
  5. io readlines

ライブラリ

検索結果

CGI#out(options = "text/html") { .... } (18604.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...