語法如下,請自行修改紅色的文字:
QUOTE:
<?php
try {
$conn = new PDO('mysql:host=11.22.33.44;dbname=adj', 'adj', '12345678', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
echo 'Connecting';
} catch(PDOException $ex) {
echo $ex->getMessage();
unset($conn);
exit();
}
?>