downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

nsapi_response_headers> <NSAPI 関数
[edit] Last updated: Fri, 25 May 2012

view this page in

nsapi_request_headers

(PHP 4 >= 4.3.3, PHP 5)

nsapi_request_headersHTTP リクエストヘッダを全て取得する

説明

array nsapi_request_headers ( void )

nsapi_request_headers() は、カレントの リクエストの HTTP ヘッダを連想配列で返します。 この関数は、PHP を NSAPI モジュールとして 実行している場合にのみサポートされます。

注意:

PHP 4.3.3 未満では、getallheaders() は Apache サーバーでのみ使用可能でした。 PHP 4.3.3 以降では、NSAPI モジュールを使用している場合、 getallheaders()nsapi_request_headers() へのエイリアスとなります。

注意:

$_SERVER スーパーグローバル変数を使うことによって Common CGI 変数を取得することも可能です。この変数は PHP を NSAPI モジュールとして実行しているか どうかにかかわらず利用できます。

返り値

HTTP ヘッダを連想配列で返します。

例1 nsapi_request_headers() の例

<?php
$headers 
nsapi_request_headers();

foreach (
$headers as $header => $value) {
  echo 
"$header$value <br />\n";
}
?>



add a note add a note User Contributed Notes nsapi_request_headers
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites