<!--#include virtual="/scripts/myfile.txt"-->
<!--#include file="myfile.txt"-->
virtual是基于"虚拟目录"的,在nginx上写../的相对路径都是好的(需修改点nginx源码),但在iis不行
file是基于(当前)文件的,可以写绝对路径,也可以写相对路径../,在iis下可以。
More Information on File and Virtual Syntax
SSI directives that use file paths can reference files by using a file or virtual path.
- The file element is used with files that are relative to the folder of the current document. The following example includes a file in the current folder:
<!--#include file="myfile.txt"-->
- The virtual element represents paths that are relative to the base folder of the Web server. The following example includes a file in the /scripts virtual folder:
<!--#include virtual="/scripts/myfile.txt"-->