WEBサーバーをUTF-8化する
PHPの文字化けを防止するために、該当するファイルと同じフォルダに「.htaccess」というファイルを置きます。
内容は以下の通りに記入して下さい。
php_value output_buffering OFF php_value default_charset UTF-8 php_value mbstring.detect_order SJIS,EUC-JP,JIS,UTF-8,ASCII php_value mbstring.http_input pass php_value mbstring.http_output pass php_value mbstring.internal_encoding UTF-8 php_value mbstring.substitute_charcter none php_value mbstring.encoding_translation OFF
- サーバーに対する支持が書かれた特別なファイル。
- サーバーはまず、このファイルを見に来る。
- このファイルがある場合は、サーバーはその中にかかれたルールに従わなければならない。