MySQL configuration for PHP
Error message: Class 'mysqli' not found in
Answer:
1. In conf/php.ini, use "/php_mysql" in vim to search for extension=php_mysql.dll, and remove the previous ";",
Also add extension=php_mysqli.dll;
Note that the dll at the back has an extra i
2. "/extension_dir" check whether the path is correct;
3. Find the ext/ directory and copy the two files php_mysql.dll and php_mysqli.dll to %systemroot%/system32.
4. Restart the service
Connect to database
//printf() function outputs a formatted string
while(list($name, $theindex) = $result->fetch_row())
echo("
".$name.$theindex);
$con = mysql_connect("localhost", "username", "password");
if ($con) {
mysql_query("set names 'gb2312'");
mysql_select_db( "Library name", $con);//Please note that no garbled characters will be added here. if ($rs) // 🎜> "