Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/08/2012, 18:58
Avatar de WyLY
WyLY
 
Fecha de Ingreso: enero-2002
Ubicación: Cancun, México.
Mensajes: 506
Antigüedad: 22 años, 3 meses
Puntos: 6
Respuesta: Incluir bloque php con parametros

La función include te permite insertar un contenido.
Esto puede ser un archivo dentro de otro, supongamos que tienes un sitio:

Código HTML:
<html>
<head><title>Pagina</title></head>
<body>

<div id="menu"><?php include("heade.php"); ?></div>

CONTENIDO

<div id="footer"><?php include("footer.php"); ?></div>

</body>
</html> 
Entonces tendríamos 3 documentos.

index.php (que es el que está arriba)
header.php (que es tu cabecera, en esta puede ir tu menu)
footer.php (copyright y la parte inferior del sitio)

Entonces supongamos que tienes otro archivo llamado acerca.php
que habla acerca de la empresa.
Si tienes la misma estructura de includes, tanto en index como en acerca te aparecerá header.php y footer.php

Te invito a que leas: http://www.webexperto.com/articulos/...forma-modular/

Saludos.
__________________
I do techy stuff for a living and practice MMA with my dog... He always wins.