<?phpheader("content-type:text/html;charset=utf-8");$link=mysqli_connect("localhost","root","1234");if($link){? ?? ? echo "連接數(shù)據(jù)服務(wù)成功".mysql_error();}else{? ? echo "連接數(shù)據(jù)服務(wù)失敗".mysql_error();}$sle=mysqli_select_db($link,"text");if($sle){? ? echo "連接數(shù)據(jù)庫成功".mysql_error();}else{? ? echo "連接數(shù)據(jù)庫失敗".mysql_error();}mysqli_query($link,"set names 'utf8'");?> ?
為什么連接數(shù)據(jù)庫會導(dǎo)致亂碼?
weibo_蓉芳107_03763669
2016-10-20 14:34:12