function logm($message) {
$t = strval(date('Y/m/d_H:i:s')).' - '.$_SERVER["REMOTE_ADDR"].' - '.strval($message)."\n";
file_put_contents($_SERVER['DOCUMENT_ROOT'].'/log.txt',$t,FILE_APPEND);
}
if (!empty($_POST)) logm('POST: '.print_r($_POST, true));
if (!empty($_GET)) logm('GET: '.print_r($_GET, true));
Selectionner le code