LogIt

PHOTO EMBED

Tue Apr 13 2021 04:01:31 GMT+0000 (UTC)

Saved by @beknaji #php

function LogIt($arr, $text)
{
  $html=$text."\n";
  foreach($arr as $k=>$v)
  {
    if(is_array($v)){ LogIt($v,'Sub array'); }else{ $html.=$k."=>".$v."\n"; }
  }
  $html.=date("d.m.Y H:i:s")."\n##########################################\n\n\n";
  $file=$_SERVER["DOCUMENT_ROOT"]."/custom_logs.txt";
  file_put_contents($file, $html, FILE_APPEND | LOCK_EX);
}
content_copyCOPY