Cita:
Iniciado por Death_Empire
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->errormsg, 104);
}
}
Entonces ¿dónde usaría allí el include?