使用php创建页脚文件

时间:2016-05-26 01:25:58

标签: php html css

我正在尝试使用我的页脚详细信息创建一个php文件。我想将其包含在必要的页面中。以下是我的footer.php

footer.php

<?php
    echo "<footer class="footer">
              <div class="container">
                  <p class="text-muted"><a href="contactus.html">Contact Us</a></p>
                  <p class="text-muted"> Copyright &copy; <span id="yearfooter"> </span>. All rights reserved.</p>
</div>
          </footer>";
?>

这是我在html文件中包含的行以包含此footer.php

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

但是当上传到我的网站时,它没有显示页脚文件。这是我第一次尝试PHP。我不确定我是否应该做其他事情或者我哪里出错了。非常感谢任何帮助!

更新

我仍然无法让这个工作。我还添加了一个.htaccess文件,它仍然没有帮助。

的.htaccess

AddType application/x-httpd-php .html

更新

我设法让这个工作。服务器端存在一些配置问题。谢谢!

1 个答案:

答案 0 :(得分:0)

尝试用单引号包装你的回声:

<access origin="*"/>
<access origin="tel:*" launch-external="yes"/>
<allow-navigation href="*"/>
<allow-navigation href="http://*/*"/>
<allow-navigation href="https://*/*"/>
<allow-navigation href="data:*"/>
<allow-intent href="*"/>
<access origin="*"/>

之间没有空间?和PHP

config.xml