The front of the # is gone, but not loaded, look carefully, oh, there is a
Extension=php_pdo.dll
So, it's OK.
By the way, do not copy the DLL file under the Windows directory, in the environment variables to add the path of PHP in the line, so good point. Right?
The original Chinese question is such a solution
Before the query
mysql_query ("Set names ' UTF8 '");
And after using PDO,
Copy CodeThe code is as follows:
$DBH = new PDO ($DSN, $user, $pass); Initializes a PDO object, which is the creation of a database connection object $DBH
echo "Connection successful
";
You can also perform a search operation
$DBH->query ("Set names UTF8");
5 Remember: The character set must be unified, the database, the website. of the page
http://www.bkjia.com/PHPjc/319378.html www.bkjia.com true http://www.bkjia.com/PHPjc/319378.html techarticle the front of the #, but can not load, look carefully, oh, there is a extension=php_pdo.dll so, OK, by the way, do not copy the DLL files under Ext to the Windows directory ...