設定 MySQL Database
<?php
//database setting
$db_server = "127.0.0.1";
$db_name = "dbname";
$db_user = "username";
$db_password ="password";
$mysqli = new mysqli($db_server,$db_user,$db_password,$db_name);
if(mysqli_connect_errno())
die("無法連接資料庫");
mysqli_query($mysqli,"set names utf8");
$mysqli->select_db($db_name);
date_default_timezone_set('Asia/Taipei');
?>