For faster navigation, this Iframe is preloading the Wikiwand page for Server Side Includes.

Server Side Includes

Server Side Includes (SSI) es un conjunto de directivas que se escriben en las páginas HTML y que se evalúan en el servidor web cuando se solicita la página HTML. SSI permite añadir contenido generado de forma dinámica a las páginas web, sin tener que programar toda la página mediante CGI, ASP, PHP o alguna tecnología similar.

El SSI no se encuentra estandarizado por ningún organismo, así que cada desarrollador de software de servidores web es libre de incluir e interpretar estas directivas como mejor le parezca. Por tanto, lo más recomendable es consultar la documentación del servidor web para averiguar qué directivas reconoce y con qué sintaxis.

Directivas

[editar]

Directivas más usuales

[editar]
Directiva Parámetros Descripción Ejemplo
include file, direct o virtual Esta es probablemente la directiva más empleada, ya que permite incluir en un documento el contenido de otro documento. El parámetro file o virtual indica el archivo (HTML page, text file, script, etc.) que se desea incluir. El parámetro file indica que la ruta del archivo a incluir es relativa a la ruta del documento actual; el parámetro virtual indica que la ruta del archivo a incluir es relativa a la raíz de la ruta del documento actual. <!--#include virtual="header.html" -->
o
<!--#include file="footer.html" -->
exec cgi o cmd Esta directiva ejecuta un programa, script o comando del sistema operativo. <!--#exec cgi="/cgi-bin/foo.cgi" -->
o
<!--#exec cmd="ls -l" -->
echo var Esta directiva muestra el contenido de la variable de entorno especificada, como por ejemplo HTTP_USER_AGENT, LAST_MODIFIED y HTTP_ACCEPT. <!--#echo var="REMOTE_ADDR" -->
config timefmt, sizefmt o errmsg Esta directiva configura el formato de visualización de las fechas, de las horas, del tamaño de los ficheros y de los mensajes de error (devueltos cuando una directiva SSI falla). <!--#config timefmt="%y %m %d" -->
o
<!--#config sizefmt="bytes" -->
o
<!--#config errmsg="<b>El comando SSI ha fallado</b>" -->
flastmod file o virtual Esta directiva muestra la fecha cuando el documento especificado fue modificado por última vez. <!--#flastmod virtual="index.html" -->
fsize file o virtual Esta directiva muestra el tamaño del documento. <!--#fsize file="script.pl" -->
printenv   Esta directiva muestra una lista de todas las variables de entorno con sus respectivos valores. <!--#printenv -->


Bibliografía

[editar]

Enlaces externos

[editar]



{{bottomLinkPreText}} {{bottomLinkText}}
Server Side Includes
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?