サーバーに小さな問題があります。
phpの「ヘッダー」関数を使用すると機能しません:
header('location: /index.html');
同じphpバージョンの別のサーバーでこの行を試しましたが、正常に動作します。
PHPバージョン:5.1.65
何かアドバイスはありますか?
header('Location: /index.html');
^---missing colon
Dylan Crossが述べたように、ヘッダーの前にHTML出力があってはなりません。
「header」を呼び出す前にライブラリが必要な場合は、注意を払わずにhtmlが含まれている可能性があります。
<?php
// Code here
?>{If there is a space after this close tag, it's considered as an HTML output}
この場合、すべてのライブラリをチェックする必要があります...
コロン()を逃したこれを試してください:
:
header('location: /index.html');