Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/02/2011, 10:33
Avatar de LanbreGroteo
LanbreGroteo
 
Fecha de Ingreso: agosto-2009
Ubicación: $Mx->['Veracruz']
Mensajes: 69
Antigüedad: 14 años, 8 meses
Puntos: 1
Respuesta: Leer contenido de un archivo

Cita:
Iniciado por Death_Empire Ver Mensaje
con include()

[url]http://cl.php.net/manual/es/function.include.php[/url]
Lo tenía contemplado pero... un ejemplo de algo que yo uso para ver los templates es esto:

Código PHP:
public function display($filename$vars = array()) {
        if(
file_exists($this->tplConfig['path']."/".$filename)) {
            
$output file_get_contents($this->tplConfig['path']."/".$filename);
            foreach(
$vars as $key => $value) {
                
$output preg_replace('/{'.$key.'}/'$value$output);
            }
            echo 
$output;
        } else {
            throw new 
Exception($this->errormsg104);
        }
    } 
Entonces ¿dónde usaría allí el include?