Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/12/2009, 06:25
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 6 meses
Puntos: 334
Respuesta: Clase Templates

bueno puedes usar classes o funciones en los otros archivos
ejemplo:
Código php:
Ver original
  1. class index{
  2.     function principal(){
  3.         $Contenido = new Plantilla ( "direccionTemplateIndex.html" );
  4.         $mensajePrueba = "testeando";
  5.         $Contenido->asigna_variable ( array ("variable" => $mensajePrueba ) );
  6.         $ContenidoString = $Contenido->muestra();
  7.         return $ContenidoString;
  8.     }
  9. }


Código php:
Ver original
  1. $Contenido = new Plantilla ( "Template.html" );
  2. include_once('otro_archivo.php');
  3. $index = new index();
  4. $variable_texto = $index->principal();
  5. $Contenido->asigna_variable ( array ("texto" => $variable_texto ) );
  6. $ContenidoString = $Contenido->muestra();
  7. echo $ContenidoString;


saludos ! ! !
__________________
More about me...
~ @rhyudek1
~ Github