In the project web page file, we found the following sentence:
<! -- Page Character Set begin -->
<! -- # Include file = "http://www.cnblogs.com/Common/CommonHeader.inc" -->
<! -- # Include file = "http://www.cnblogs.com/Common/CommonInclude.inc" -->
I always thought it was a comment statement, but I didn't pay attention to it. Today, we accidentally found that this is not a comment.
The. inc file, as its name implies, is the include file. In fact, the file suffix does not matter for file inclusion. You can include an ASP file or TXT file. Generally, we use Inc as the suffix because it can reflect the role of the file.
Using the inc file can make ourProgramTo increase readability and make development and maintenance easier.
Use of the. inc file:
Use # include in the SSI (Server Side Include) command. asp contains files in the following format: in HTML, write:
<! -- # Include file = "FILENAME" -->
<! -- # Include virtual = "FILENAME" -->
The difference between file and virtual is that file uses relative paths, while virtual is the complete virtual path of the virtual directory in your web site, such:
<! -- # Include file = "INC/Char. Inc" -->
It indicates the char. inc under the INC directory under the virtual directory path where the current file is located. If it is written as virtual, it may need to be written as follows:
<! -- # Include virtual = "/myweb/INC/Char. Inc" -->
The. inc file can contain Character Set settings, such: . Inc
< Base Target = "_ Self" />
<! -- Page Character Set begin -->
< Meta HTTP-equiv = "Content-Type" Content = "Text/html; charsets = UTF-8" />
<! -- Page Character Set begin -->
<! -- Page cache setting begin -->
< Meta HTTP-equiv = "Pragma" Content = "No-Cache" />
< Meta HTTP-equiv = "Cache-control" Content = "No-Cache" />
< Meta HTTP-equiv = "Expires" Content = "0" />
<! -- Set end for page Cache -->
<! --++-->
< Link Href = "Http://www.cnblogs.com/../Style/aaa.css" Type = "Text/CSS" REL = "Stylesheet" />
< Link Href = "Http://www.cnblogs.com/../Style/bbb.css" Type = "Text/CSS" REL = "Stylesheet" />
<ScriptType= "Text/JavaScript"SRC= "Http://www.cnblogs.com/../Script/bbb.js"> </Script>
<ScriptType= "Text/JavaScript"SRC= "Http://www.cnblogs.com/../Script/aaa.js"> </Script>
reference: http://www.wangchao.net.cn/bbsdetail_542328.html