这是我的PDO课程
class Database{
public $isConn;
protected $datab;
//connect to db
public function __construct($username = "root" , $password = "" , $host = "localhost" , $dbname = "job" , $options =[ ]){
$this->isConn = TRUE;
try{
$this->datab = new PDO("mysql:host={$host};dbname={$dbname};charset=utf8",$username , $password ,$options);
$this->datab->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$this->datab->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
} catch ( PDOException $e ){
throw new Exception($e->getMessage());
}`enter code here`
}
任何人请帮助,我的数据库值是日语然后我想输出日语单词。我如何更改此代码?