一、问题现象:
如果存在include的问题,打开的页面源代码中,会包含错误提示信息:
“<!--#include virtual="xxx/xxx.html"-->”
(xxx/xxx.html泛指任意html文件)
二、问题解决:
1、修改apache配置文件,httpd.conf
(1)添加:AddType text/html .shtml
AddOutputFilter INCLUDES .html
(2)去掉注释:
LoadModule include_modules/mod_include.so
(3)修改Document_Root的Options参数:
Options Indexes FollowSymLinks Includes
2、重启apache:/usr/local/apache/bin/apachectl restart
三、结果验证:
再次打开刚才出问题的页面查看显示结果。
转载于:https://blog.51cto.com/wuluwa/1095827