1.首先需要修改apache的配置文件;

打开httpd.conf

搜索“AddType text/html .shtml”

搜索结果:

AddType text/html .shtml .html .htm

AddOutputFilter INCLUDES .shtml .html .htm

把这两行前面的#去掉。

然后搜索“Options Indexes FollowSymLinks”

在搜索到的那一行后面添加“ Includes”

即将该行改变为 Options Indexes FollowSymLinks Includes

保存httpd.conf,重起即可。

2.将内容碎片放到以inc结尾的文件中;

3.使用include标签引进inc碎片;

<!--#include file=“/inc/文件名.inc”-->

4.文件结尾以shtml;

如何在html中添加引用公共模块文件

如何在html中添加引用公共模块文件

如何在html中添加引用公共模块文件

 

相关文章:

  • 2021-06-01
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2021-08-11
  • 2021-12-01
  • 2022-01-20
猜你喜欢
  • 2022-03-06
  • 2021-11-19
  • 2022-01-26
  • 2021-12-29
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
相关资源
相似解决方案