-
The difference between include file and include virtual.
include file contains the relative path of the file, include virtual contains the virtual path of the file.
2。In the same virtual directory, the effect is the same, but if the virtual directory is named myweb, it can also be debugged, but we know that the error is absolutely necessary.
3。If there are 2 virtual directories under a site, myweb1 and myweb2, there are files under myweb1 and files under myweb2, if you want to call, then you should write like this: In this case, it is impossible to use include file, and an error will inevitably be reported.
Conversely, it is the same for including files from myweb1 in a myweb2 file. If the included file is under a folder, just append the folder to the virtual path.
4。Regardless of whether you use include file or include virtual, using " " or " " in the path or using both in combination will not affect the compilation effect, and the program will run smoothly.
5。The above situation does not apply to the mutual call of 2 site files, and it is within the same site, and equivalent, but assuming the site name is website, it is wrong to use.
The same can be debugged through. **There are no debugs in the two virtual directories.
-
Your problem is not the problem of the path of these two ways, but that you don't understand what the absolute path is, the relative path, you are very impetuous, and I am here.
This post already tells you about it. So I'm not going to tell you.
-
It's to put some of the common ** into it, and then use it in each asp file to be used, wrap it in and put it in the head, and it's OK
For example, you have to define dim rs for each file
You can write dim rs in.
In the future, as long as you wrap it in an asp file, you don't need to use dim rs, because it has already been dimmed.
And that's just a simple example, you can define a utility function or procedure or something else.
-
HTML pages don't support this.
This is only supported by ASP or some other dynamic page (PHP, JSP) or the like.
-
You can understand it as:
Replace all the ** in the include page with this paragraph**.
The main reason for using include is to facilitate management. Because a lot of the time. The required ** is fixed in each page. The most representative is conn, which is connected to the database.
-
This is to be used in the ASP page.
Try adding this sentence to your page, %@language="vbscript" codepage="936"%>
-
Variables are not available, relative paths; Variables and virtual paths are not available.
-
Don't have such labels in it.
-
It's okay to write, it should be that you don't typeset.
-
It is an asp** page that connects to the database, and it is used by other asp web pages that need to query the database, and it is very convenient to manage:
It's convenient to use.,Hundreds of pages need the content of this page in the future.,You can call it.,If you change it later.,It's also the content that changes.,All other page content will be updated.。
You can understand it as:
Replace all the ** in the include page with this paragraph**.
The main purpose of using include is to facilitate management, and it is enough to change the connection. Because a lot of the time. The required ** is fixed in each page. The most representative is conn, which is connected to the database.
-
include
The include command instructs the web server to insert the contents of the file into the HTML page. The included files can contain anything that is valid in an HTML document. Instructions must be enclosed with HTML annotation delimiters.
This command can be used in both asp and html pages.
Grammar. Parameter.
pathtype
Set the path type of filename. Paths can be of one of the following types:
Path Type Meaning.
File The file name is the relative path to the directory where the document with the include command is located. Included files can be in the same directory or subdirectory; But it can't be in the upper directory of the page with the include command.
The virtual file name is the full virtual path to the virtual directory on the web site.
filename
Specify the name of the file to include. The filename must contain the filename extension, and the filename must be quoted ("Caused.
Exegesis. Files containing the include command must use a file extension mapped to the ssi interpreter; Otherwise, the web server will not process the command. By default, the extension is .
stm、.shtm and .shtml will be mapped to the interpreter (.
If you have Internet Service Manager installed, you can modify the default extension mappings and add new mappings. See Set up application mapping. The included files can have any file extension, but it is recommended to give them a
inc extension. Example.
-
This is one way to include files (for asp files) for example, if you have two files, one of which contains a web banner.
is a homepage file, and if there are many pages in this ** that need to have such a banner, you can add it to every place that needs to contain the banner file.
In the future, if you want to change the content of this banner, you only need to renew it
-
It should be you who try it, and it should be possible, the page you called is in the wz folder, and the wz folder is in a directory (**root), so you can't use the call method of the parent directory.
-
1 WZ Error You have selected Allow in the WIS WED Server Extension.
2 There was an error connecting to the database!
-
It should be the wrong path.,File uses a relative path.,Check it again.。