Home > Backend Development > PHP Tutorial > Notes on loading new changes in ph php5 pdo

Notes on loading new changes in ph php5 pdo

WBOY
Release: 2016-07-29 08:38:46
Original
1107 people have browsed it

The # number in front is gone, but it cannot be loaded. If you look carefully, 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. After downloading it, just add the php path to the environment variable, which is better. right?
The original Chinese problem is solved like this
Before querying
mysql_query("set names 'utf8'");
After using pdo

Copy the codeThe 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 it. . .


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

The above introduces the precautions for loading new changes in ph php5 pdo, including ph content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
ph
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template