Старт
This commit is contained in:
24
observation/config.php
Normal file
24
observation/config.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$db_connection="pgsql:host=94.247.128.218;dbname=monitoring_new;";
|
||||
$db_login="postgres";
|
||||
$db_password="y7HMHi0ATxx1VC3UU5WG";
|
||||
|
||||
$Schema="main.";
|
||||
|
||||
function connectToDB()
|
||||
{
|
||||
global $db_connection,$db_login,$db_password;
|
||||
$db = null;
|
||||
try
|
||||
{
|
||||
$db = new PDO($db_connection, $db_login, $db_password);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
} catch (Exception $ex)
|
||||
{
|
||||
print $ex->getMessage();
|
||||
error_log($ex->getMessage());
|
||||
}
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user