(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)
mb_http_output — HTTP 出力文字エンコーディングを設定あるいは取得する
HTTP 出力文字エンコーディングを設定あるいは取得します。
この関数を実行した後、
出力は内部エンコーディングから encoding に変換されます。
encoding
encoding が設定された場合、
mb_http_output() は
HTTP 出力文字エンコーディングを
encodingに設定します。
encoding が省略された場合、
mb_http_output()
は現在の HTTP 出力文字エンコーディングを返します。
encoding が省略された場合、
mb_http_output()
は現在の HTTP 出力文字エンコーディングを返します。それ以外の場合、
成功した場合に true を、失敗した場合に false を返します。
encoding にヌルバイトが含まれている場合、
ValueError がスローされます。
| バージョン | 説明 |
|---|---|
| 8.4.0 |
encoding にヌルバイトが含まれている場合、
mb_http_output() は
ValueError をスローするようになりました。
|
| 8.0.0 |
encoding は、nullable になりました。
|
By default this is set to 'pass' witch means that php will not touch the encoding and output it as it is in the source file.
Normaly this function isn't needed as long as you save the .php file in the same encoding as you want it to output as well as retrive all input in the same encoding, but it don't seam to herd as long as it able to figure out what encoding the output is in ín the first place.