日期:2014-05-17  浏览次数:20594 次

求助!关于在 shtml 中的 include 错误
我的目录结构是:web-app/about.shtml   和   web-app/commons/header.html   。

在   about.shtml中, <!--#include   virtual= "../common/header.html "   -->
为什么会报   an   error   occurred   while   processing   this   directive   。

当我吧about.shtml放在与commons同级的目录(比如:web-app/user/about.shtml)时,使用 <!--#include   virtual= "../common/header.html "   -->
header.html是可以包含进来的



------解决方案--------------------
<!--#include virtual= "../common/header.html " -->
不太清楚SSI中的包含怎么算。如果这个是相对路径的话,那就对头。
../ 表示父路径。
../common/header.html 表示父目录下的common目录下header.html文件