Ver Mensaje Individual
  #6 (permalink)  
Antiguo 04/01/2013, 16:49
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Fatal error: Call to a member function getElementsByTagName() ... pero no

Pues lo mejor es un log en un txt, y es ir grabando paso a paso, esta clase te puede ayudar:
Código PHP:
Ver original
  1. /**
  2.  * Clase para actuar como logger
  3.  *
  4.  * @author Christopher Valderrama
  5.  */
  6. class Logger {
  7.     private $handle;
  8.  
  9.     public function __construct($logFile, $append = false)
  10.     {
  11.         $mode = ($append) ? 'a' : 'w';
  12.         $this->handle = fopen($logFile, $mode);
  13.     }
  14.  
  15.     public function log($info)
  16.     {
  17.         $str = "[" . date("Y/m/d h:i:s", mktime()) . "] " . $info . "\r\n";
  18.         fwrite($this->handle, $str);
  19.     }
  20.  
  21.     public function __destruct()
  22.     {
  23.         fclose($this->handle);
  24.     }
  25. }

Es algo simple y se usa así:
Código PHP:
Ver original
  1. $log = new Logger('log.txt', true);
  2. $log->log('algo');