| Server IP : 172.67.187.206 / Your IP : 172.71.28.155 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/supply_system/ |
Upload File : |
<?php
// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// --- Database Configuration ---
$db_host = 'localhost'; // Host ของฐานข้อมูล (ส่วนใหญ่เป็น localhost)
$db_user = 'root'; // Username สำหรับเชื่อมต่อฐานข้อมูล
$db_pass = 'P@ssw0rdMySQL0'; // Password สำหรับเชื่อมต่อฐานข้อมูล
$db_name = 'supply_system'; // ชื่อฐานข้อมูลที่คุณให้มา
// --- Create Database Connection (mysqli) ---
$conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
// --- Check Connection ---
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
// --- Set Character Set to UTF-8 ---
mysqli_set_charset($conn, "utf8");
// --- Set Timezone ---
date_default_timezone_set('Asia/Bangkok');
// --- Start Session ---
// ตรวจสอบว่า session ยังไม่ได้เริ่มทำงาน
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
// --- Base URL (Optional but Recommended) ---
// กำหนด URL หลักของเว็บ เพื่อให้ง่ายต่อการสร้างลิงก์
// เปลี่ยน 'http://yourdomain.com/supply_system' ตามที่อยู่จริงของคุณ
define('BASE_URL', 'https://program.sesaorb.go.th/supply_system'); // แก้ไขตาม path จริงของคุณ
?>