数据分析师2017-09-30 23:05:36
Do we need to specify the character encoding used by the database when we create the database - PHP Chinese website Q&A - Do we need to specify the character encoding used by the database when we create the database - PHP Chinese website Q&A
Take a look around and learn.
怪我咯2016-12-20 11:47:46
创建数据库的时候如果不指定字符编码,会使用默认的字符编码,在后面的链接数据库的时候使用mysqli_set_charset函数指定一下字符编码就就可以了,像下面这样,
$link = mysqli_connect('localhost','root','root','mybbs');//链接数据库
mysqli_set_charset($link,'utf8'); //设定字符集