script.php
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
<?php
function sql_query($query) {
$sql = mysql_query($query);
if ($sql) {
return $sql;
} else {
$bestand = fopen('_errorlog.txt', 'a');
fwrite($bestand, (date('d').'-'.date('m').'-'.date('Y').' '.date('H').':'.date('i').':'.date('s'))." - ".$_SERVER['REQUEST_URI']." - ".$query." - ".mysql_error()." - ".$_SERVER['REMOTE_ADDR']."\n");
fclose($bestand);
die('Er gaat iets fout!');
}
}
?>
function sql_query($query) {
$sql = mysql_query($query);
if ($sql) {
return $sql;
} else {
$bestand = fopen('_errorlog.txt', 'a');
fwrite($bestand, (date('d').'-'.date('m').'-'.date('Y').' '.date('H').':'.date('i').':'.date('s'))." - ".$_SERVER['REQUEST_URI']." - ".$query." - ".mysql_error()." - ".$_SERVER['REMOTE_ADDR']."\n");
fclose($bestand);
die('Er gaat iets fout!');
}
}
?>