【发布时间】:2018-06-07 17:36:52
【问题描述】:
我正在尝试使用 php 的“包含”语句重用网站标题的代码。
在index.php文件(首页)中是:
<body>
<?php
include_once "includes/header.php";
?>
</body>
然后 header.php 只是 html,前几行看起来像:
<?php
<nav class="navbar navbar-inverse">
<div class="container-fluid">
.....
?>
我收到一条错误消息:
Parse error: syntax error, unexpected '<', expecting end of file in header.php
谁能告诉我我错过了什么,或者是否有更好的方法来做到这一点?
【问题讨论】:
标签: php