浏览代码

Add PHP ODBC

FusionPBX 2 年之前
父节点
当前提交
eab2c49bd0
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      resources/pdo.php

+ 11 - 0
resources/pdo.php

@@ -271,6 +271,17 @@ if ($db_type == "pgsql") {
 	}
 	}
 } //end if db_type pgsql
 } //end if db_type pgsql
 
 
+if ($db_type == "odbc") {
+	//database connection
+	try {
+		$db = new PDO("odbc:".$db_name);
+	}
+	catch (PDOException $error) {
+		print "error: " . $error->getMessage() . "<br/>";
+		die();
+	}
+} //end if db_type pgsql
+
 //get the domain list
 //get the domain list
 	if (!is_array($_SESSION['domains']) or !isset($_SESSION["domain_uuid"])) {
 	if (!is_array($_SESSION['domains']) or !isset($_SESSION["domain_uuid"])) {