PHP – Connect MySQL

設定 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');

?>

開始在上面輸入您的搜索詞,然後按回車進行搜索。按ESC取消。

返回頂部