Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/12/2011, 17:57
eybel
 
Fecha de Ingreso: marzo-2007
Mensajes: 782
Antigüedad: 17 años, 1 mes
Puntos: 16
header.php, index.php y footer.php con include

Bueno queria saber si esto es una buena idea:

Voy a armar un website y quiero hacerlo lo mejor posible. Tengo creado un header_init.php un index.php y un footer.php.

Quiero saber si armar la web con este patron usando "include" esta bien o puede traer problemas... Osea voy a tener solo 1 archivo con el <!DOCTYPE> y los headers y en cada pagina voy a integrarlo con include.


header_init.php:
Código PHP:
<?php ob_start(); ?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>A Place To Click</title>
<link href="template.css" rel="stylesheet" type="text/css">
</head>
<body>



<div class="header">
  <input type="text" name="email" id="email">
  <input type="password" name="password" id="password">
</div>
<!-- HEADER_INIT -->
index.php:
Código PHP:
<!--HEADER_INIT-->
<?php include ('header_init.php'); ?>

<!--CONTENT-->


<!--CONTENT-->

<!--FOOTER-->
<?php include ('footer.php'); ?>
footer.php:
Código PHP:

<!-- FOOTER -->
</
body>
</
html