The "relative path" here is relative to the folder where the "Main call file" is located.
# Include file
# Include file is followed by the "relative path" of the file, and "absolute path" cannot be used ".
Use relative paths, such as: file = "script \ file. Inc", file = ".. \ Script \ file. Inc"
Absolute paths cannot be used, such as: file = "\ Script \ file. Inc"
# Include virtual
# Include virtual can be followed by the "absolute path" of the file or the "relative path" of the form (the so-called "relative path" of the form ", this path is regarded as a "relative path" in form, but it will still be converted to an "absolute path". Therefore, it is essentially an "absolute path ")
Use absolute path, for example, virtual = "\ Folder \ file. Inc"
The relative path, such as virtual = "Folder \ file. Inc", is converted to virtual = "\ Folder \ file. Inc"
We recommend that you use the "absolute path" format, such as virtual = "\ Folder \ file. Inc" instead of virtual = "Folder \ file. Inc ".
Let's talk about the differences based on several examples:CopyCodeThe Code is as follows: Suppose "include file" and "include file" are in the same folder named folder in the root directory, then virtual = "Folder \ file. ASP "is acceptable, while file =" Folder \ file. ASP "is incorrect.
If there are two folders folder1 and folder2 under a website, file1.asp and file2.asp under folder1, and file2.asp under folder2, and file1.asp to call file2.asp, you can write in file1.asp as follows:
<! -- # Include virtual = "\ folder2 \ file2.asp" -->,
In this case, use <! -- # Include file = "folder2 \ file2.asp" --> is incorrect.
Pay attention to the following points during use:
Whether using # include file or # include virtual, you can simply use "/" or "\" or both in the path.
For example, file = ".. \ Script \ file. Inc", file = "../script/file. Inc", file = "../script \ file. Inc"
# Include file and # include virtual can only contain files in the site, but cannot contain files outside the site. For example, assume that a website named website is incorrect when Virtual = "website \ file. asp" is used.