Mysql query about PHP garbled problem solving

PHP utf8 and not only recognize utf8

 $cfg = parse_ini_file("system.ini");
		echo $cfg['hostanme'];
		$db=new PDO('mysql:host='.$cfg['hostanme'].';dbname='.$cfg['dbname'], $cfg['username'],$cfg['password']);
		$db->exec("set character_set_client = utf8");
		$db->exec("SET character_set_results =utf8");
		$db->exec("SET character_set_connection = utf8");


Published 27 original articles · won praise 53 · views 160 000 +

Guess you like

Origin blog.csdn.net/auspi12341/article/details/16863669