The "relative path" here is relative to the folder where the "keynote file" is located.
#include file
#include file is followed by the "relative path" of the files, and "absolute path" is not allowed.
Use relative paths, such as: file= "Script\file.inc", file= "... \script\file.inc "
You cannot use an absolute path, such as: file= "\script\file.inc"
#include virtual
#include virtual can be followed by the "absolute path" of the file, you can also follow the formal "relative path" (the so-called "relative path", refers to the form of the path is "relative path", but it will be converted to "absolute path", so essentially "absolute path")
Use absolute path, such as: Virtual= "\folder\file.inc"
The use of formal "relative path", such as: Virtual= "Folder\file.inc", will be converted to virtual= "\folder\file.inc"
It is recommended to use the "absolute path" form, such as: Virtual= "\folder\file.inc", rather than write virtual= "Folder\file.inc", although this can be
Combining several examples, say the difference:
Copy Code code as follows:
Assuming that "Include files" and "included files" are in the same folder as the root directory named folder, then Virtual= "folder\file.asp" is OK, and file= "folder\file.asp" is wrong.
If a site has 2 folders under Folder1 and Folder2,folder1 files under File1.asp,folder2 file file2.asp, if file1.asp to invoke File2.asp, Then you can write this in file1.asp:
<!--#include virtual= "\folder2\file2.asp";
In this case, using the <!--#include file= "folder2\file2.asp"--> is wrong.
In the course of use, pay attention to the following points:
Whether using #include file or #include virtual, use a simple "/" or simply "\" or both to mix and use in the path.
such as: file= ". \script\file.inc ", file=". /script/file.inc ", file=". /script\file.inc "
#include file and #include virtual can only contain station files and cannot contain outbound files. For example, if you have a site named website, it is wrong to use virtual= "website\file.asp".
Current 1/2 page
12 Next read the full text