When I first started, I found a lot of errors. In fact, it is very simple. Just refer to the original settings of shtm. Prerequisites: Installation of ServerSideIncludeModule: When installing IIS, select the service ("Include files on the server", option), as follows: 1: Processing Mapper Add module mapping request path *.html Module select ServerSideIncludeModule, name fill in: SSINC-html 2: Restart IIS Enter The detailed steps are as follows 1. First find the website you want to modify, not the folder, then find the handler mapping on the right and double-click to enter 2. Find the following three These three are stm, shtm, and shtml. They all have the same effect, but the suffixes are different. We can open them and take a look. 3. We use *.shtm to open it, and now we understand that it is implemented through module mapping , which makes it convenient for us to add later. Other .do files can be executed just like php. They are all the same. Just refer to the original mapping method. 4. We add a copy Here, *.html supports shtm. You can see the added module mapping on the right. 5. The parameters are as follows *.html Select ServerSideIncludeModule from the drop-down 6. You can write a name that is easy for you to recognize. 7. Similarly, we can set *.htm in the same way Let me share with you the usage of shtm shtml is a file used for SSI technology. That is Server Side Include--SSI server-side include directive. Some Web Servers have SSI functions. shtml files will be treated specially. First scan the shtml file to see if there are any special SSI instructions. If there is, the SSI instructions are interpreted according to the Web Server setting rules. After the explanation, it is transferred to the client together with the general HTML. 1. Config command The Config command is mainly used to modify the default settings of SSI. in: Wednesday, April 12, 2019 Sizefmt : Determines whether file sizes are expressed in bytes, kilobytes, or megabytes. If bytes are specified, the value is "bytes"; abbreviations for kilobytes and megabytes may be used. Likewise, the sizefmt parameter must be placed before the fsize command in order to be used. <!--#config sizefmt="bytes" --> 2. Include command The Include command can insert text or images from other documents into the currently parsed document, which is the key to the entire SSI. With the Include command, you can update your entire site instantly by just changing one file! The Include command has two different parameters:
File: Give a path relative to the current directory. You cannot use "../" or an absolute path. For example: 3. Echo Command The echo command can display the following environment variables: DOCUMENT_NAME : Displays the name of the current document.
The result is: DOCUMENT_URI : Displays the virtual path of the current document. For example: <!--#echo var="DOCUMENT_URI" --> The result is: http://YourDomain<!--#echo var="DOCUMENT_URI" --> QUERY_STRING_UNESCAPED: Displays the query string sent by the client without escaping, where all special characters are preceded by the escape character "\". For example: <!--#echo var="QUERY_STRING_UNESCAPED" --> DATE_LOCAL : Displays the date and time in the server's set time zone. Users can customize the output information by combining the timefmt parameter of the config command. For example: <!--#config timefmt="%A, the %d of %B, in the year %Y" --> The result is: Saturday, the 15th of April, in the year 2019
LAST_MODIFIED: Displays the last update time of the current document. Again, this is a very useful feature in SSI. Just add the following line of simple text to the HTML document to dynamically display the update time on the page. <!--#echo var="LAST_MODIFIED" --> CGI Environment Variables In addition to the SSI environment variables, the echo command can also display the following CGI environment variables:
4. Fsize : Displays the size of the specified file. The output format can be customized by combining the sizefmt parameter of the config command. <!--#fsize file="index_working.html" --> 5. Flastmod : Displays the last modification date of the specified file. The output format can be controlled in conjunction with the timefmt parameter of the config command. <!--#config timefmt="%A, the %d of %B, in the year %Y" --> Here, we can use the flastmod parameter to display the update date of all linked pages on a page. Here’s how: <!--#config timefmt=" %B %d, %Y" --> The result is: 6. Exec The Exec command can execute CGI scripts or shell commands. Here’s how to use it:
I have introduced it this time. It is very simple, isn’t it? |
<<: How to install MySQL 8.0.17 and configure remote access
>>: Steps to customize icon in Vue
Usage of having The having clause allows us to fi...
Preface Let's get straight to the point. The ...
Table of contents 1. Basic Concepts 1.1 Two kinds...
Before understanding this problem, let's firs...
Recently, there has been a growing demand for imp...
The basic principle of all animations is to displ...
This article shares the specific code of js to ac...
The following is some basic sql knowledge I have ...
Side note <br />If you know nothing about HT...
Preface: This article refers to jackyzm's blo...
Putting aside databases, what is dialect in life?...
Preface We often say that node is not a new progr...
Overview MySQL also has its own event scheduler, ...
During the project optimization today, MySQL had ...
Table of contents 1. Memory model and runtime dat...