debuggage
This commit is contained in:
parent
aa342fb297
commit
ac6a1d2640
8
log.php
8
log.php
@ -4,11 +4,11 @@
|
||||
require_once( "config.inc.php" );
|
||||
header( 'Location: ' . $accueil );
|
||||
}*/
|
||||
require_once( "db.class.php" );
|
||||
//require_once( "db.class.php" );
|
||||
require_once( "entete_mail.php" );
|
||||
|
||||
// $level => INFO, ALERT, ERROR
|
||||
function log_write($log, $level=INFO)
|
||||
/*function log_write($log, $level=INFO)
|
||||
{
|
||||
global $table_prefix, $webmaster, $headers;
|
||||
$user = ( !empty( $_SERVER["PHP_AUTH_USER"])?$_SERVER["PHP_AUTH_USER"]:'' );
|
||||
@ -48,14 +48,14 @@ function log_write($log, $level=INFO)
|
||||
{
|
||||
mail( $webmaster, "Erreur Site Web", $log_mail, $headers );
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// $db = true -> écrire les logs dans la base (défaut)
|
||||
// $die = true -> execute die()
|
||||
function log_error($log, $w_db=true, $die=false)
|
||||
{
|
||||
global $webmaster, $headers, $accueil, $db;
|
||||
if ( $w_db ) log_write($log, ERROR);
|
||||
//if ( $w_db ) log_write($log, ERROR);
|
||||
echo "$log<br />\n";
|
||||
$log_err = 'erreur dans la requête<br/>un rapport détaillé a été envoyé au webmaster';
|
||||
if ( $die )
|
||||
|
Reference in New Issue
Block a user