debug teacher
This commit is contained in:
parent
0845ad62a9
commit
4aad1e35ef
@ -10,18 +10,6 @@ include('include/headscript.php');
|
|||||||
$dbHandler = DBHandlerSelect::getInstance();
|
$dbHandler = DBHandlerSelect::getInstance();
|
||||||
$pdo = $dbHandler->getConnection();
|
$pdo = $dbHandler->getConnection();
|
||||||
|
|
||||||
ini_set('display_errors', 1);
|
|
||||||
ini_set('display_startup_errors', 1);
|
|
||||||
ini_set('log_errors', 1);
|
|
||||||
error_reporting(E_ALL);
|
|
||||||
|
|
||||||
set_exception_handler(function ($e) {
|
|
||||||
http_response_code(500);
|
|
||||||
echo "<pre>UNCAUGHT EXCEPTION:\n" . $e->getMessage() . "\n\n" . $e->getTraceAsString() . "</pre>";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Verifica che iduserlogin sia definito
|
// Verifica che iduserlogin sia definito
|
||||||
if (!isset($iduserlogin)) {
|
if (!isset($iduserlogin)) {
|
||||||
die("Errore: ID utente non definito.");
|
die("Errore: ID utente non definito.");
|
||||||
|
|||||||
@ -11,6 +11,17 @@ require_once 'class/mailer.php';
|
|||||||
$dbHandler = DBHandlerSelect::getInstance();
|
$dbHandler = DBHandlerSelect::getInstance();
|
||||||
$pdo = $dbHandler->getConnection();
|
$pdo = $dbHandler->getConnection();
|
||||||
|
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
ini_set('display_startup_errors', 1);
|
||||||
|
ini_set('log_errors', 1);
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
|
set_exception_handler(function ($e) {
|
||||||
|
http_response_code(500);
|
||||||
|
echo "<pre>UNCAUGHT EXCEPTION:\n" . $e->getMessage() . "\n\n" . $e->getTraceAsString() . "</pre>";
|
||||||
|
exit;
|
||||||
|
});
|
||||||
|
|
||||||
if (!isset($iduserlogin)) {
|
if (!isset($iduserlogin)) {
|
||||||
die("Errore: utente non loggato.");
|
die("Errore: utente non loggato.");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user