請問以下兩種寫法的區(qū)別
請問各位大神,mysql_query("set names 'utf8'"); 和?header("Content-type: text/html; charset=utf-8"); 有什么區(qū)別? 先謝謝各位啦!
請問各位大神,mysql_query("set names 'utf8'"); 和?header("Content-type: text/html; charset=utf-8"); 有什么區(qū)別? 先謝謝各位啦!
2017-02-06
舉報
2017-02-06
mysql_query("set names 'utf8'"); 對數(shù)據(jù)庫的操作
header("Content-type: text/html; charset=utf-8");在php中對編碼的設(shè)置,
他們作用對象不同