问题:
静态页面中,使用include 引用另外一个html文件
解决过程:
1.Nginx中启用ssi,location配置中加入三行配置,重启。
location / {
ssi on;
ssi_silent_errors on;
ssi_types text/shtml;
2.index.html引入header.html
<!-- 切记include的#前不能有空格 -->
<!--#include file="/html/public/header.html"-->
静态页面中,使用include 引用另外一个html文件
location / {
ssi on;
ssi_silent_errors on;
ssi_types text/shtml;
<!-- 切记include的#前不能有空格 -->
<!--#include file="/html/public/header.html"-->