我试图验证一个简单的HTML5页面,它成功验证除了<?php include标记为错误的三个语句实例之外的所有内容.我无法弄清楚是什么让它不带PHP标签.为什么会这样?以下是它输出的三个错误:
Validation Output: 3 Errors
Line 29, Column 5: Saw <?. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)
<?php include("inc/main-menu.php"); ?>
Line 87, Column 9: Saw <?. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)
2007-<?php echo date("Y"); ?>
Line 94, Column 3: Saw <?. Probable cause: Attempt to use an XML processing instruction …Run Code Online (Sandbox Code Playgroud)