valid-html错误

时间:2012-07-02 14:46:38

标签: xhtml-transitional

当我试图验证我的php文件(用xhtml和php编写)时,我得到了2个我无法解决的错误:S错误是:

1 - 省略了“body”的结束标记,但指定了OMITTAG NO

2 - 省略了“html”的结束标记,但指定了OMITTAG NO

在这里,我粘贴了我的文件的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <?php

        require 'include/config.php';
        connection();
        if(isset($_COOKIE['COOKIE_CHECK']) === FALSE) {

            setcookie('COOKIE_CHECK', 'ENABLED', time() + 31536000);
            header('Location: index.php');

        }

    ?>
    <title>Nome da definire - Homepage</title>

    <link rel="shortcut icon" href="themes/<?php echo $home_theme; ?>/images/homepage/favicon/favicon.ico" />

    <!-- CSS DELLA PAGINA E PLUGIN -->
    <link rel="stylesheet" type="text/css" href="themes/<?php echo $home_theme; ?>/css/index.css" title="index" />
    <link rel="stylesheet" type="text/css" href="themes/<?php echo $home_theme; ?>/css/news.css" title="index" />


    <!-- PLUGIN JQUERY -->
    <script src="include/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>

    <!--SCRIPT BROWSER AGGIORNATO
    <script type='text/javascript'> 

        var ba = document.createElement('script'); 
        ba.type = 'text/javascript'; 
        ba.async = true; 
        ba.src = 'http://www.browseraggiornato.it/browser-updated.js?t=a&p=tl'; 
        var s = document.getElementsByTagName('script')[0]; 
        s.parentNode.insertBefore(ba, s); 

    </script>-->

    <!-- SCRIPT PULSANTI -->
    <script type="text/javascript">

        jQuery.noConflict();
        jQuery(function() {

            jQuery("ul#menu span").css("opacity","0");

            jQuery("ul#menu span").hover(function () {
                jQuery(this).stop().animate({

                    opacity: 1

                }, 'slow');
            },
            function () {

                jQuery(this).stop().animate({

                    opacity: 0

                }, 'slow');
            });
        });

    </script>

    <!-- SCRIPT NEWS -->
<script type="text/javascript">
    jQuery.noConflict();
    jQuery(function() {

        var ticker = function() {

            setTimeout(function() {
                jQuery('#ticker li:first').animate({

                    marginTop: '-100px'

                }, 800, function() {

                    jQuery(this).detach().appendTo('ul#ticker').removeAttr('style');

                });
                ticker();
            }, 4000);
        };
       ticker();
    });
</script>

<?php

    $login_error = '';

    if(isset($_GET['login_error']) === TRUE && $_GET['login_error'] != '') {

        if($_GET['login_error'] == 'usrpss') {

            $login_error .= ' alert(\'Devi inserire username e password per poter effettuare il login!\');';

        }   else if($_GET['login_error'] == 'wrong') {

            $login_error .= ' alert(\'Hai inserito dei dati errati oppure il tuo account non &egrave; ancora stato attivato!\');';

        }

    }

?>

</head>

<body<?php if($login_error != '') { echo ' onload="' . $login_error . '"'; } ?>>    

    <?php

        if(isset($home_theme) === TRUE && $home_theme != '') {

            if(check_directory('themes/' . $home_theme . '') === TRUE) {            

                if(check_file($path . '/index.php') === TRUE) {

                    require $path . '/index.php';

                }   else {

                    echo 'Il file dell\'index per questo tema non esiste';

                }

            }   else {

                echo 'La cartella del tema selezionato non esiste';

            }

        }

        connection_close();

    ?>

</body>

</html>

请帮帮我:(谢谢

0 个答案:

没有答案