【发布时间】:2017-01-11 22:10:08
【问题描述】:
我有一个index.php 文件:
<?php
// Load resources shared across the website
include '../path/to/other_file.php';
?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es" prefix="og: http://ogp.me/ns#">
<head prefix="article: http://ogp.me/ns/article#">
<title>Title</title>
</head>
<body>
<!-- Code -->
</body>
</html>
当我加载它时,它什么也没显示。我用this online tool 看看发生了什么。问题出现在第 5 行。
可能是我使用<? 来介绍XHTML 文档,但我猜PHP 认为下面的单词应该是php (<?php //CODE ?>) 而不是xml (<?xml version="1.0" encoding="UTF-8"?>)
我该如何解决?我认为这称为“解析”或“分隔”字符。
【问题讨论】: