包括页脚网页在服务器中的任何页面 [英] Include footer page to any page in the server

查看:178
本文介绍了包括页脚网页在服务器中的任何页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想包括一些页脚网页在我的服务器上的任何页面,而无需调用从页面文件。

I want to Include some footer page to any page in my server without calling the file from the pages.

我知道,有一种方法可以做到这一点与Apache或类似的东西,但我不知道该怎么做。

I know that there is a way to do that with apache or something like that, but I have no idea how to do that.

推荐答案

在你的的.htaccess ,你可以做到这一点:

In your .htaccess, you can do it with:

php_value auto_append_file 'footer.php'

该文件必须存在于PHP的的include_path 参见文档获得略多的信息

auto_append_file所指令也可以在php.ini中进行设置。

The auto_append_file directive can also be set in php.ini.

这篇关于包括页脚网页在服务器中的任何页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆