From 17cf832b9a068464ffea3f5234cbb1d7df081bfa Mon Sep 17 00:00:00 2001 From: Ellin Date: Wed, 1 Nov 2023 10:36:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=87=E9=80=A3=E7=B7=9AT8=E8=B3=87=E6=96=99?= =?UTF-8?q?=E5=BA=AB=E5=AD=98=E5=88=B0fun=5Fglobal=E5=85=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ wms/fun_global.php | 13 ++++++++++ wms/header.php | 2 +- wms/loginapi.php | 3 ++- wms/rib-test.php | 63 +++++++++++++++++++++++++++------------------- 5 files changed, 55 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 2227fb1c..098a9a18 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ wms/contract/.env /pdfs/ wms/database.php workflow/log/ +wms/header.php +wms/loginapi.php diff --git a/wms/fun_global.php b/wms/fun_global.php index 48f952b0..38e16855 100644 --- a/wms/fun_global.php +++ b/wms/fun_global.php @@ -28,6 +28,19 @@ function sql_myself($user_id, $column="creater") { return $sql_cmd; } +/** + * 連線T8 MSSQL + */ +try { + $conn = new PDO("sqlsrv:Server=60.244.87.101;Database=T8MASADA", "masada", "@m222222"); + if ($conn) { + $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + } +} catch (PDOException $e) { + echo "fail"; + echo $e->getMessage(); +} + /** * 下屬列表 diff --git a/wms/header.php b/wms/header.php index dd637333..9a25c3de 100644 --- a/wms/header.php +++ b/wms/header.php @@ -1,6 +1,6 @@