Basic format of SSI command
code:
illustrate:
is a comment in HTML syntax. When the WEB server does not support SSI, this information will be ignored.
#include is one of the SSI directives.
file is the parameter of include, info.htm is the parameter value, which in this command refers to the name of the document to be included.
Notice:
-
Example:
The name of this document
Current time
Your IP address#include demonstration
Function: Insert the content of the text file directly into the document page.
grammar:
file The filename is a relative path relative to the directory containing the document using the #include directive. The included file can be in the same level directory or its subdirectory, but not in the upper level directory. For example, if it represents the nav_head.htm document in the current directory, it is file="nav_head.htm".
The virtual filename is the full path to the virtual directory on the Web site. For example, it means the nav_head.htm file in the hoyi directory relative to the server document root directory; it is file="/hoyi/nav_head.htm"Parameters:
file specifies the location of the included file relative to this document
virtual specifies the location relative to the server document rootNotice:
The file name must have an extension.
The included files can have any file extension. I find it most convenient to use the htm extension directly. Microsoft recommends using the .inc extension (it depends on your preference).
Example:
Insert the header file into the current page
Insert the tail file into the current page#flastmod and #fsize demonstration
Function:
#flastmod file last updated
#fsize file lengthgrammar:
Parameters:
file specifies the location of the included file relative to this document. For example, info.txt represents the info.txt document in the current directory
virtual specifies the location relative to the server document root directory, such as /hoyi/info.txt meansNOTE: The file name must have an extension.
Example:
Insert the latest update date of the news.htm file in the current directory into the current page
Insert the file size of news.htm in the current directory into the current page#exec demonstration
Function: Insert the output of an external program into the page. It can be inserted into CGI programs or as input to regular applications, depending on whether the parameters used are cmd or cgi.
grammar:
Parameters:
cmd regular application
cgi CGI script programExample:
The password file will be displayed
will display the file list in the current directory
The CGI program gb.cgi will be executed.
The CGI program access_log.cgi will be executed.Note: As you can see from the above example, this command is quite convenient, but it also has security issues.
Prohibited methods:
Apache, delete the "Options Includes ExecCGI" line in access.conf;
In IIS, to disable the #exec command, modify the SSIExecDisable metabase;
#config
Function: Specify the format of error information, date and file size returned to the client browser.
grammar:
Parameters:
errmsg Customize SSI execution error messages any way you like.
sizefmt file size display mode, the default is byte mode ("bytes") and can be changed to kilobyte mode ("abbrev")
timefmt time display mode, the most flexible configuration attribute.Example: Display the size of a non-existent file
Display file size in kilobytes
grammar:
Display time in a specific time format
Display today’s day of the week, month, and time zone
The above is the detailed content of STHML tutorial(2). For more information, please follow other related articles on the PHP Chinese website!

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.