【问题标题】:How to apply html head to multiple pages? [duplicate]如何将html head应用于多个页面? [复制]
【发布时间】:2017-07-18 08:15:28
【问题描述】:

我在 HTML 正文中使用 PHP 来放置页眉和页脚,有没有办法像 wp_head() 一样将 head 元素应用到多个页面中?

【问题讨论】:

  • include()require()require_once()

标签: php html head


【解决方案1】:

您可以为 Header 创建一个 HTML 文件并使用 PHP 您可以使用:

<?php require_once('header.php'); >

<?php include 'footer.php'; ?>

【讨论】:

    猜你喜欢
    • 2012-01-22
    • 2014-09-27
    • 1970-01-01
    • 1970-01-01
    • 2016-11-19
    • 2014-01-28
    • 1970-01-01
    • 1970-01-01
    • 2012-11-29
    相关资源
    最近更新 更多