mirror of
https://github.com/SWG-Source/web-data.git
synced 2026-07-13 21:00:58 -04:00
Initial Commit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user