Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/01/2011, 13:31
juanjoselive
 
Fecha de Ingreso: febrero-2006
Mensajes: 52
Antigüedad: 18 años, 2 meses
Puntos: 0
Respuesta: he descargado una aplicacion opensource pero el index me da un error

Cita:
Iniciado por repara2 Ver Mensaje
Debes comprobar todos los archivos que se incluyan en este script.
Por otro lado comprueba que el objeto template tenga el método contructor.
Si el constructor se llama __contruct() renóbralo y ponle el mismo nombre que la classe. Salu2
ESTE EL CODIGO DE TEMPLANTE.PHP


<?
class Template {
var $vars; /// Holds all the template variables

/**
* Constructor
*
* @param $file string the file name you want to load
*/
function Template($file = null) {
$this->file = $file;
}

/**
* Set a template variable.
*/
function set($name, $value) {
$this->vars[$name] = is_object($value) ? $value->fetch() : $value;
}

/**
* Open, parse, and return the template file.
*
* @param $file string the template file name
*/
function fetch($file = null) {
if(!$file) $file = $this->file;

extract($this->vars); // Extract the vars to local namespace
ob_start(); // Start output buffering
include($file); // Include the file
$contents = ob_get_contents(); // Get the contents of the buffer
ob_end_clean(); // End buffering and discard
return $contents; // Return the contents
}

}
?>