説明
string get_status_header_desc( int $code )
HTTPステータス説明文を取得する。
パラメータ
- $codeHTTPステータスコード。
返り値
パラメータ$codeに応じたHTTPステータス説明文を返す。未知のステータスコードを指定した場合は''を返す。注意
主なステータスコードと説明文は次の通り。コード | 説明文 | バージョン |
---|---|---|
100 | Continue | 2.3.0~ |
101 | Switching Protocols | 2.3.0~ |
102 | Processing | 2.3.0~ |
103 | Early Hints | 5.1.0~ |
200 | OK | 2.3.0~ |
201 | Created | 2.3.0~ |
202 | Accepted | 2.3.0~ |
203 | Non-Authoritative Information | 2.3.0~ |
204 | No Content | 2.3.0~ |
205 | Reset Content | 2.3.0~ |
206 | Partial Content | 2.3.0~ |
207 | Multi-Status | 2.3.0~ |
226 | IM Used | 2.3.0~ |
300 | Multiple Choices | 2.3.0~ |
301 | Moved Permanently | 2.3.0~ |
302 | Found | 2.3.0~ |
303 | See Other | 2.3.0~ |
304 | Not Modified | 2.3.0~ |
305 | Use Proxy | 2.3.0~ |
306 | Reserved | 2.3.0~ |
307 | Temporary Redirect | 2.3.0~ |
308 | Permanent Redirect | 4.5.0~ |
400 | Bad Request | 2.3.0~ |
401 | Unauthorized | 2.3.0~ |
402 | Payment Required | 2.3.0~ |
403 | Forbidden | 2.3.0~ |
404 | Not Found | 2.3.0~ |
405 | Method Not Allowed | 2.3.0~ |
406 | Not Acceptable | 2.3.0~ |
407 | Proxy Authentication Required | 2.3.0~ |
408 | Request Timeout | 2.3.0~ |
409 | Conflict | 2.3.0~ |
410 | Gone | 2.3.0~ |
411 | Length Required | 2.3.0~ |
412 | Precondition Failed | 2.3.0~ |
413 | Request Entity Too Large | 2.3.0~ |
414 | Request-URI Too Long | 2.3.0~ |
415 | Unsupported Media Type | 2.3.0~ |
416 | Requested Range Not Satisfiable | 2.3.0~ |
417 | Expectation Failed | 2.3.0~ |
418 | I'm a teapot | 3.9.0~ |
421 | Misdirected Request | 4.5.0~ |
422 | Unprocessable Entity | 2.3.0~ |
423 | Locked | 2.3.0~ |
424 | Failed Dependency | 2.3.0~ |
425 | Too Early | 6.6.0~ |
426 | Upgrade Required | 2.3.0~ |
428 | Precondition Required | 3.9.0~ |
429 | Too Many Requests | 3.9.0~ |
431 | Request Header Fields Too Large | 3.9.0~ |
451 | Unavailable For Legal Reasons | 4.5.0~ |
500 | Internal Server Error | 2.3.0~ |
501 | Not Implemented | 2.3.0~ |
502 | Bad Gateway | 2.3.0~ |
503 | Service Unavailable | 2.3.0~ |
504 | Gateway Timeout | 2.3.0~ |
505 | HTTP Version Not Supported | 2.3.0~ |
506 | Variant Also Negotiates | 2.3.0~ |
507 | Insufficient Storage | 2.3.0~ |
510 | Not Extended | 2.3.0~ |
511 | Network Authentication Required | 3.9.0~ |
使用例
- HTTPステータスコード403の説明文を取得する。<?php $desc = get_status_header_desc( 403 ); ?>
フィルター
実行するフィルターはありません。アクション
実行するアクションはありません。ソースファイル
/wp-includes/functions.php最終更新 : 2024年07月18日 11:49
関連
お勧め
Login rebuilder 2.3.0の新機能を紹介(2018年5月27日 更新)
プラグイン「Login rebuilder」はログイン時の履歴(ログ)や不正なログインページへのアクセス履歴を保存している。これらの履歴情報はダッシュボートで確認できるが、バージョン2.3.0においてそれぞれがダウンロードできるようになった。
古めのリビジョンを削除した時のメモ(2022年5月16日 更新)
大きく育ったデータベースを整理するため、古めのリビジョンとそれに紐づいたカスタムフィールドデータを削除。と思ったら「The total number of locks exceeds the lock table size」というエラーが発生して削除できなかった。
決まった値を返すだけの関数群(2018年5月27日 更新)
WordPressのソースコードを眺めているとフィルター関数名で'__return_○○'が指定されている部分を時々見かけます。それらの関数定義を見てみると、すべて決まった値を単純に返すだけでした。これらの関数がちょっと気になったので、まとめてみました。
「Align widgets horizontally」プラグインのフィルター使用例(2024年5月15日 更新)
ダッシュボードのウィジェットを横並びに変える「Align widgets horizontally」プラグインには緒設定を変更できるフィルターが用意されている。ここではフィルターの使い方と設定できる項目について紹介する。
WP_Postオブジェクトで投稿情報を直感的に使う(2012年10月4日 更新)
WordPress 3.5で登場するであろう WP_Postクラス。WordPressの投稿情報は、投稿情報本体のほか、カテゴリーや投稿タグ、カスタムフィールドなど、いくつかに分散して記録され、それぞれの情報を取得する際は、いくつかの関数をしていた。新しいWP_Postクラスにより、その習慣とおさらばできるかもしれない。