ガラパゴス携帯対応のwebサイトのエンコードエラーについて

実現したいこと

エンコードエラーを解消したい

発生している問題・分からないこと

現在、さくらのサーバにアップロードしているサイトを確認すると、ブラウザにエラーメッセージが表示され、サイトが正しく表示されない問題が発生しております。

エラーメッセージ

error

1This page contains the following errors: 2error on line 1 at column 1: Encoding error 3Below is a rendering of the page up to the first error.

該当のソースコード

index.php

1<?php 2//共通ファイルの読み込み(相対パス) 3include_once './include/commons.php'; 4header('Content-Type: application/xhtml+xml'); 5echo '<?xml version="1.0" encoding="Shift_JIS"?>'; 6?> 7<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> 8<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" dir="ltr"> 9<head> 10<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=Shift_JIS" /> 11<meta name="description" content="ここにdescriptionが入ります" /> 12<meta name="keywords" content="ここにkeywordsが入ります " /> 13<meta http-equiv="Pragma" content="no-cache" /> 14<meta http-equiv="Cache-Control" content="no-cache" /> 15<title>ここにタイトルが入ります</title> 16…以下略

AddType application/xhtml+xml .php

試したこと・調べたこと

上記の詳細・結果

該当のindex.phpはShift-JIS形式で保存されています。

補足

エンコードエラーとなっているのはテスト環境用でのサーバのみとなり、本番環境用のサーバは別会社となるのですがそちらでは同じデータでも問題なく表示されています。このあたりも理由がわからず困っています。。。

さくらインターネットさんに問い合わせをしましたが、おそらくサーバの問題では無いのか「ウェブサイトの管理に関しては回答できかねる」ということでした。

コメントを投稿

0 コメント