What is SHTML
Using the html file extension of SSI (Server Side Include), SSI (Server Side Include), often called "server-side embedding" or "server-side include", is a server-based web page production technology similar to ASP.
How SSI works:
You can use Server-Side Include (SSI) directives to include text, graphics, or application information into a web page before the content is sent to the browser. For example, you can use SSI to include a time/date stamp, a copyright notice, or a form for customers to fill out and return. Using include files is an easy way to include text or graphics that appear repeatedly in multiple files. Just put the content into one include file instead of typing the content into all files. The include file is called with a very simple statement, which instructs the web server to insert the content into the appropriate web page. And, when you use include files, all changes to the content only need to be done in one place.
Because files containing SSI directives require special handling, all SSI files must be given the SSI file extension. The default extensions are .stm, .shtm, and .shtml.
The web server processes SSI commands while processing web pages. When the web server encounters an SSI directive, it directly inserts the contents of the containing file into the HTML web page. If the "include file" contains an SSI directive, this file is also inserted. In addition to the basic instructions for including a file, you can use SSI instructions to insert information about a file (such as its size) or to run an application or shell command.
A problem often encountered in website maintenance is that the structure of the website has been fixed, but a large number of web pages have to be redone in order to update a little content. SSI provides a simple and effective way to solve this problem. It places the basic structure of a website in several simple HTML files (templates). All we have to do in the future is to pass the text to the server and let the program Automatically generate web pages based on templates, making it easy to manage large websites.
Therefore, the purpose of pages using SHTML format is similar to ASP, but because it is an API, it runs faster and more efficiently. It is faster than ASP and slower than HTML. However, because server-side includes can be used, it makes page updates easier (especially Batch update banner, copyright, etc.), imagine that you have a piece of HTML, and you need to insert some special server-side scripts in the middle, such as inserting other HTML paragraphs. You choose ASP to complete this task, but if the task is more arduous, more work is needed. If it takes more time, such as 5 seconds, if you don't use ASP but use SHTML, the processing time may be only 4 seconds.
What is SSI used for?
The reason I bring up SSI is because Shtml - an acronym for Server-Parsed HTML. Contains HTML text containing embedded server-side include commands. The SHTML document is completely read, parsed, and modified by the server before being sent to the browser. There are some similarities between shtml and asp. In the file named shtml, some SSI instructions are used, just like the instructions in asp. You can write SSI instructions in the SHTML file. When the client accesses these shtml files, the server These SHTML files will be read and interpreted, and the SSI instructions contained in the SHTML files will be interpreted. For example: you can use SSI instructions in the SHTML file to reference other html files (#include). The file sent by the server to the client is Interpreted SHTML will not have SSI directives. It realizes functions that HTML does not have, that is, it can realize dynamic SHTML, which can be said to be an evolution of HTML. Sina's news system is like this. The news content is fixed, but the advertisements and menus on it are referenced using #include.
At present, there are mainly the following uses:
Display server-side environment variables
Insert text content directly into the document
-
Display WEB document related information (such as file creation date/size, etc.)
##Directly execute the file on the server Various programs(such as CGI or other executable programs)
Set the SSI information display format(such as file creation date /Size display mode)
It is an SSI command. Its function is to copy the content of "info.htm" to the current page. When the visitor comes to browse, he will see the content of info.htm displayed in the same way as other HTML documents. The usage form of other SSI commands is basically the same as the example just now. It can be seen that SSI usage only requires inserting a little code, and the usage form is very simple. Of course, if the WEB server does not support SSI, it will just treat it as annotation information and skip the content directly; the browser will also ignore this information.
How do I configure SSI functionality on my WEB server?
On some WEB servers (such as IIS 4.0/SAMBAR 4.2), files containing #include directives must use an extension that has been mapped to the SSI interpreter; otherwise, the Web server will not process the SSI directive; by default, the extension The names .stm, .shtm, and .shtml are mapped to the interpreter (Ssinc.dll).
Apache depends on your settings. Modify srm.conf such as:
AddType text/x-server-parsed-html .shtml will only parse SSI commands for files with .shtml extension
AddType text/x-server-parsed-html .html will parse SSI instructions for all HTML documents
The Netscape WEB server directly uses the Administration Server to turn on the SSI function.
Website uses the Mapping tag in the Server Admin program, and the extension added content type is: wwwserver/html-ssi
The Cern server does not support SSI. You can use the SSI fraud method. Go to http://sw.cse.bris.ac.uk/WebTools/fakessi.html and download a PERL script to make your CERN server use some SSI commands. (The exec command is not supported.)
The above is the detailed content of STHML tutorial (1). For more information, please follow other related articles on the PHP Chinese website!

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

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.


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

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.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 English version
Recommended: Win version, supports code prompts!

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool