Differences between include file and include virtual

Source: Internet
Author: User
1. # Include file: The relative path of the file to be included; # include virtual path of the file to be included.
2. In the same virtual directory, <! -- # Include file = "file. asp" --> and <! -- # Include virtual = "file. asp" --> the effect is the same, but if the virtual directory is named myweb, <! -- # Include virtual = "myweb/file. asp" --> debugging is also supported, but we know that <! -- # Include file = "myweb/file. asp" --> An error is returned.
3. If a website has two virtual directories: myweb1 and myweb2, myweb1 has a file file1.asp, and myweb2 has a file file2.asp. If file1.asp wants to call file2.asp, write it like this in file1.asp: <! -- # Include virtual = "myweb2/file2.asp" --> in this case, # include file cannot be used. <! -- # Include file = "myweb2/file2.asp" --> An error is inevitable. On the contrary, files in myweb2 that contain myweb1 are the same. If the contained file is under a folder, you only need to add the folder to the virtual path.
4. Whether using # include file or # include virtual, using "/" or "\" in the path does not affect the compilation effect, ProgramIt will be executed smoothly.
5. The preceding situation does not apply to the mutual calling of two site files, and is in the same site. <! -- # Include file = "file. asp" --> and <! -- # Include virtual = "file. asp" --> equivalent, but assume the site name is website, use <! -- # Include virtual = "website/file. asp" --> is incorrect.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.