|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Oct 2005
Messaggi: 453
|
[PHP] Catturare eccezione di mysql_connect
Ciao,
ho scritto questo codice: Codice:
try{
$connection=mysql_connect($_GET['s'],$_GET['u'],$_GET['p']);
if (!$connection)
{
die('Errore durante il tentativo di connessione: ' . mysql_error());
};
mysql_select_db ($_GET['db']);
}
catch (Exception $e)
{
echo("Attenzione: " . $e->getMessage() . "<br/>\n");
}
echo "Connessione avvenuta correttamente!";
Codice:
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'a' (1) in /var/www/SnortMonitor/connect.php on line 9 Errore durante il tentativo di connessione: Unknown MySQL server host 'a' (1) Errore durante il tentativo di connessione: Unknown MySQL server host 'a' (1). Grazie. |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Oct 2005
Messaggi: 453
|
Nessuno?
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 21:08.



















