【问题标题】:include navigation and wrapper in all pages and insert new content in each page在所有页面中包含导航和包装器,并在每个页面中插入新内容
【发布时间】:2014-03-29 22:35:34
【问题描述】:

我在header.php 中保存了一个导航栏和包装器,并将其包含在我的content.php 页面中。但是当我加载content.php 页面时,来自content.php 的内容位于header.php 页面的包装之外。

<html>
<body>
<div class="navigation">
<?php include 'header.php'; ?>
<h1>Welcome to my home page.</h1>
<p>Some text.</p>
</div>
</body>
</html>

非常感谢所有帮助!

【问题讨论】:

    标签: php html navigation include wrapper


    【解决方案1】:

    因为您为导航菜单定义了包装器(在 header.php 文件中)。如果您希望您的包装器包装您的整个文档,请在您的 content.php 文件中定义它。

    【讨论】:

      猜你喜欢
      • 2016-01-24
      • 1970-01-01
      • 1970-01-01
      • 2012-09-15
      • 2011-04-05
      • 2017-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多