- Joined
- 11 yrs. 6 mth. 27 days
- Messages
- 5,381
- Reaction score
- 18,380
- Age
- 45
- Wallet
- 11,590$
- [email protected]
Server Side Includes && General background.
Server Side Includes(SSI) is server language for web pages, designed to make static HTML pages a little more dynamic. SSI meant to make HTML pages similar to dynamic applications, such as those written in ASP, PHP and similar languages and allow the inclusion of dynamic information server in HTML pages.
HTML pages with SSI tags usually have shtml extension or shtm. On IIS server the extension stm also possible.
The most common use of SSI is including contents of files into a web page from the web server.
The SSI code must be with rounded with <!--# and --> tags.
SSI functions\commands syntax are usually like this :
Live example:
All who knows PHP can understand that the following codes are doing the same thing\action:
With PHP :
With SSI :
So...I'm giving you now the most common functions\commands in SSI :echo
Parameters: var.
Uses: To print contents of HTTP environment variables, like HTTP_ACCEPT, LAST_MODIFIED, and HTTP_USER_AGENT.
Example :
~include
Parameters: virtual\file
Uses: To includes files.
Example:
Another option with file parameter:
~exec
Parameters: cmd\cgi
Uses: Executes script, shell command and program on the server. cmd parameter contain a server-side command and the cgi parameter contain the path to a CGI script.
Example:
To run cgi script:
To execute shell command:
Server Side Includes(SSI) is server language for web pages, designed to make static HTML pages a little more dynamic. SSI meant to make HTML pages similar to dynamic applications, such as those written in ASP, PHP and similar languages and allow the inclusion of dynamic information server in HTML pages.
HTML pages with SSI tags usually have shtml extension or shtm. On IIS server the extension stm also possible.
The most common use of SSI is including contents of files into a web page from the web server.
The SSI code must be with rounded with <!--# and --> tags.
SSI functions\commands syntax are usually like this :
Live example:
All who knows PHP can understand that the following codes are doing the same thing\action:
With PHP :
With SSI :
So...I'm giving you now the most common functions\commands in SSI :echo
Parameters: var.
Uses: To print contents of HTTP environment variables, like HTTP_ACCEPT, LAST_MODIFIED, and HTTP_USER_AGENT.
Example :
~include
Parameters: virtual\file
Uses: To includes files.
Example:
Another option with file parameter:
~exec
Parameters: cmd\cgi
Uses: Executes script, shell command and program on the server. cmd parameter contain a server-side command and the cgi parameter contain the path to a CGI script.
Example:
To run cgi script:
To execute shell command: