タイムスタンプをRFC 1123の日付形式に変換します。(ja)
# 出力すると以下のようになります。
# Mon, 29 Aug 2011 06:41:08 GMT
string
date
([integer $timestamp = null])
-
integer
$timestamp: タイムスタンプ(ja) Timestamp(en)
有効期限を設定します。(ja)
Set the expiration date.(en)
# 以下のようにレスポンスヘッダーを出力します。
# Cache-Control: max-age=3600
# Expires: Mon, 29 Aug 2011 10:31:06 GMT
void
expires
(integer $time)
-
integer
$time: 有効期限までの秒数(ja) Expiration Seconds(en)
既に出力したHTTP Response Headerを取得します。(ja)
Get the HTTP Response Header output now.(en)
mixed
getHeader
([mixed $name = null])
-
mixed
$name: 取得したいフィールドを指定します。全てのフィールドを取得したい場合値は空でよいです。(ja) Specify the field to get.(en)
リクエストされたHTTPのバージョン。(ja)
Version of the HTTP request.(en)
string
getHttpVersion
()
gzipのエンコードを開始します。(ja)
Start the encoding of gzip.(en)
# 以下のようにレスポンスヘッダーを出力します。
# Vary: Accept-Encoding
# Content-Encoding: gzip
mixed
gzip
()
HTTP Response Headerを出力します。(ja)
Print the HTTP Response Header(en)
'ETag' => 'Etag Field value',
'Content-MD5' => 'Content-MD5 Field value',
'Last-Modified' => 1314600068
));
# 以下のようにレスポンスヘッダーを出力します。
# Etag: "d4289a42770d87be5a78cbcefcc1e3b76a07f94dd1005020736b6943e0e65bf07d97472739fb775ea7a8107ce024864def444d935f494e096f2bfd0382bb2e84"
# Content-MD5: RhQI+teVkAukVCltE3K+yg==
# Last-Modified: Mon, 29 Aug 2011 06:41:08 GMT
void
header
(mixed $headers, [mixed $replace = true], [boolean $_replace = true])
-
mixed
$headers: Headerの配列またはフィールド名(ja) Headers array or field name(en)
-
mixed
$replace: 前に送信された類似のヘッダを置換するか。$headersがフィールド名の場合フィールドの内容
-
boolean
$_replace
HTML用のHeaderを出力します。(ja)
Print the Header for HTML.(en)
# 以下のようにレスポンスヘッダーを出力します。
# Content-Style-Type: text/css
# Content-Script-Type: text/javascript
void
htmlHeader
()
Webブラウザーがキャッシュしない様に指示します。(ja)
Instructs the Web browser not to cache.(en)
# 以下のようにレスポンスヘッダーを出力します。
# Expires: Mon, 26 Jul 1997 05:00:00 GMT
# Last-Modified: Mon, 29 Aug 2011 07:15:22 GMT
# Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
# Pragma: no-cache
void
noCache
()
条件が一致すれば"304 Not Modified"または"412 Precondition Failed"を出力します。(ja)
Print the "304 Not Modified" or "412 Precondition Failed" if the conditions are matched.(en)
mixed
notModified
([boolean $exit = true])
-
boolean
$exit: PHPを終了するならばtrue(ja) If True, the closing PHP(en)
パブリックなキャッシュをするように指示します。(ja)
Public Cache(en)
# 以下のようにレスポンスヘッダーを出力します。
# Cache-Control: public
# Pragma: public
void
publicCache
()
範囲リクエストに対応します。(ja)
Corresponds to a Range Request.(en)
mixed
range
([string $content = null])
Serverの情報を出力します。(ja)
Print the Server information.(en)
# 以下のようにレスポンスヘッダーを出力します。
# Server: Apache/2.2
boolean
server
([string $content = null])
HTTP Status Codeを出力します。(ja)
Print the HTTP Status Code.(en)
# 以下のようにレスポンスヘッダーを出力します。
# HTTP/1.1 404 Not Found
boolean
statusCode
([integer $status = 200], [string $httpVersion = null])
-
integer
$status: HTTP Status Codeの番号(ja) The number of HTTP Status Code(en)
-
string
$httpVersion: HTTPのバージョン(ja) HTTP Version(en)