Initial Commit

This commit is contained in:
CekisSWG
2019-01-29 08:58:19 -08:00
parent a8da7fe900
commit a78b245135
5 changed files with 233 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
function openDb(){
$settings = json_decode(file_get_contents(__DIR__."/../settings.json"), false);
// don't change this.
$tns = "(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ".$settings->serverIp.")(PORT = ".$settings->dbPort."))
)
(CONNECT_DATA =
(SERVICE_NAME = ".$settings->dbSid.")
)
)";
return new PDO("oci:dbname=".$tns,$settings->dbUser,$settings->dbPass);
}
?>