ホームページ >バックエンド開発 >PHPチュートリアル >このようにインクルードファイルを書くと中国語部分が文字化けしてしまうのはなぜでしょうか?
インクルードファイルを次のように書きます。なぜ中国語の部分が文字化けしますか?
ファイルは合計 2 つあります:
A、index.php ファイルのコード:
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <?php require("/title.php"); ?> ...test.....
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php header(“Content-Type: text/html; charset=utf-8") ?> <title>中文标题(beta 1.0)----Powered by Aloesky</title> <meta name="keywords" content=""> <meta name="description" content=""> <link href="../css/css.css" rel="stylesheet" type="text/css"> <link href="../css/menu.css" rel="stylesheet" type="text/css">