Home  >  Article  >  Backend Development  >  Precautions for loading new changes in php5 pdo_PHP tutorial

Precautions for loading new changes in php5 pdo_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:50:25847browse

The # number in front is there, but it cannot be loaded. Take a closer look, oh, it turns out there is
extension=php_pdo.dll
So, it’s OK

By the way, don’t put it again Copy the dll file under ext to the windows directory, and just add the path to php in the environment variable. This is better. Right?

The original Chinese problem is solved like this
Before querying
mysql_query("set names 'utf8'");
After using pdo

Copy code The code is as follows:

$dbh = new PDO($dsn, $user, $pass); //Initializing a PDO object means creating a database Connection object $dbh
echo "Connection successful
";
//You can also perform a search operation
$dbh->query("set names utf8");// that's all. . .

5 Remember: the character set must be unified, both for the database and the website.
of page

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319378.htmlTechArticleThe # number in front is there, but it cannot be loaded. Take a closer look, oh, it turns out there is extension=php_pdo .dll So, it’s OK. By the way, don’t copy the dll file under ext to the windows directory...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn