What is SHTML?

xiaoxiao2021-03-06  67

What is the use of SSI? The reason why SSI is because SHTML - Server-Parsed HTML's initial thumbnail. The HTML text containing the embedded server contains the command. Before being transferred to the browser, the server reads, analyzes, and modifications to the SHTML document. SHTML and ASP have some similar, in a file named after SHTML, use SSI's instructions, just like the instructions in the ASP, you can write SSI instructions in the SHTML file, when the client accesss these SHTML files, the server side These SHTML files will be read and interpreted, and the SSI instructions contained in the SHTML file are explained, for example, you can use the SSI directive to reference other HTML files (#include) in the SHTML file, the server is transmitted to the client file, is The Explaced SHTML does not have an SSI directive. It implements the features of HTML, that is, dynamic SHTML can be said to be an evolution of HTML. The news system like Sina is like this, and the news content is fixed but it's the advertisements and menus above it is incorporated by #include. Currently, there are several uses: 1. Display server-side environment variables <#echo> 2, plug the text directly into the document <#include> 3, display web document related information <#flastmod #fsize> (such as Document production date / size, etc.) 4, directly execute various programs <#exec> (such as CGI or other executable) 5, set SSI information display format <#config> (such as file production date / size display mode) Advanced SSI can set the variable using the IF condition statement. Using SSI SSI is a set of commands provided for web servers, which can be embedded directly into the annotation content of the HTML document. Such as: is an SSI directive, its role is to copy "info.htm" to the current page, when the visitor is browsing, The contents of Info.htm are displayed like other HTML documents. Other SSI instructions are basically similar to the examples, and it can be seen that SSI use is only inserted into a point, and the form is very simple. Of course, if the web server does not support SSI, it will simply use it as a comment message, skip them directly; the browser will ignore this information. How do I configure SSI function on my web server? On some web servers (such as IIS 4.0 / Sambar 4.2), the file containing the #include command must use the extension that has been mapped to the SSI interpreter; otherwise, the web server will not process the SSI directive; default, expand Name .stm, .shtm and .shtml are mapped to the interpretation program (SSINC.DLL). Apache is based on your settings, modify SRM.conf as: addtype text / x-server-pased-html .shtml will only be paired with the .shtml extension file resolution SSI command addtype text / x-server-parse- HTML .html will use the Administration Netscape Web server to use Administration Server to open SSI features.

Website uses the mapping tab in the Server Admin program, the extension adds the content type to: WWWServer / HTML-SSI CERN server does not support SSI, SSI fraud method can be used, to http://sw.cse.bris.ac.uk/webtools/ Fakessi.html downloads a Perl script to make your CERN server use some SSI instructions. (Do not support EXEC instructions.) SSI directive basic format SSI instruction basic format: program code: Data Code: Description: 1. is a comment in the HTML syntax, which is ignored when the web server does not support SSI. 2. #include is one of the SSI instructions. 3. FILE is the parameter of the include, INFO.HTM is the parameter value, refers to the document name to be included in this instruction. Note: 1.

This document name: program code: Today: Program code: Your IP address is the program code: # include demonstration: Plug the content of the text file directly into the document page. Syntax: Program code: File file name is a relative path that is located relative to the directory where the documentation using the #include instruction. The included files can be in the same level directory or their subdirectories, but cannot be in the previous directory. As indicating the NAV_HEAD.htm document in the current directory, File = "NAV_HEAD.HTM". The Virtual file name is the full path to the virtual directory on the Web site. As indicating the NAV_HEAD.htm file under the HOYI directory relative to the server document; the file = "/ hoyi / nav_head.htm" parameter: file specifies that the location Virtual specified by the file relative to this document is specified relative to the server document root directory. Location Note: 1. The file name must have an extension. 2. The file being included can have any file extensions. I feel that I use the HTM extension directly, Microsoft recommends using the .inc extension (this will look at your hobby). Example: Program code: Plug the header file into the current page Insert the tail file into the current Page Plug the header file into the current page Insert the tail file into the current page #flastmod and #fSize Demonstration: #flastmod file Recent update date #fsize file length syntax: program code: parameter: file specifying the location of the included file relative to this document, such as info.txt means the current directory The underfo.txt document Virtual specifies that the location relative to the root directory of the server document is as good as /hi/info.txt: The file name must have an extension.

Example: program code: Recent updated date of the news.htm file in the current directory Plug in the current page program code: Size of the news.htm in the current directory To the current page #EXEC Demonstration: Insert an output of an external program into the page. You can insert the CGI program or the input of the regular application, depending on the parameter used is CMD or CGI. Syntax: program code: Parameters: CMD General Application CGI CGI Script Program: Program Code: will Display password file will display the list of files in the current directory will Perform the CGI program GB.cgi. will execute the CGI program access_log.cgi. The password file will be displayed will display the list of files in the current directory will execute the CGI program GB.cgi. will execute the CGI program access_log.cgi. Note: From the example above, this instruction is quite convenient, but there is also a security problem. Prohibited method:. Apache deletes the line code of "Options Includes Execcgi" in Access.conf; In IIS, to disable the #exec command, modify the ssiexecdisable metadata;

#Config: Specifies the format of the error message, date, and file size that returns to the client browser. Syntax: Program code: parameters : Errmsg Custom SSI executes error messages, you can do anything you like. Sizefmt file size display mode, the default is byte mode ("Bytes") can be changed to the kilobyte mode ("Abbrev") Timefmt time display mode, the most flexible configuration properties. Example: Displaying a size program code that does not exist file: Display file size in kilobyte mode: Show time program code at a specific time format: Show Today is the week, a few months, time zone Show Today is the week, a few months, time zone xssi xssi (extended ssi) is a set of advanced SSI instructions, built in Apache 1.2 or more High versions of MOD-INCLUDE modules. Among them, the instructions are: #printenv # set # if #printenv effect: Displays all environment variables currently existing in the web server environment.

转载请注明原文地址:https://www.9cbs.com/read-91916.html

New Post(0)