php include xhtml1-strict.dtd
I have a simple index.php file which checks for user authentication, and if all is ok includes index.html file with user gallery:
<?php
if(!user_is_authenticated()) {
header("location: http://somelo开发者_高级运维ginsite");
}
include("index.html");
?>
I have an issue with xhtml1-strict.dtd index.html declaration - if the html file included is declared as mentioned I get the following error:
Parse error: syntax error, unexpected T_STRING in /var/www/.../index.html on line 1
With all other declarations it works fine... What am I missing?
Your problem is the xml declaration
<?xml version="1.0" encoding="UTF-8"?>
^^ <-- here
It looks like php. Either turn off short tags or echo the declaration
echo '<?xml version="1.0" encoding="UTF-8"?>';
精彩评论