About the. inc file

Source: Internet
Author: User

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

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.