Posted By

nicolaspar on 05/30/07


Tagged

file debug error save log archivo guardar


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

vali29
gordoyuri


PHP - Debug in File


 / Published in: PHP
 

  1. <?
  2. define('PATH', dirname(realpath(__FILE__)) );
  3. function debug($texto){
  4. file_put_contents(PATH.'/log.log',date('d/m/Y H:i:s').' - '.$texto."
  5. ",FILE_APPEND);
  6. echo date('d/m/Y H:i:s').' - '.$texto."<br>";
  7. flush();
  8. return;
  9. }
  10. #Ej
  11. debug('iniciando proceso...');
  12. ?>

Report this snippet  

You need to login to post a comment.