php.ini provided mysql database module
A, mysql test code
1, in G: \ php \ wamp \ Apache24 \ htdocs folder, document hello.php established, as follows:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
</head>
<body>
<?php
echo '<h1>Hello World!<h1/>';
echo date('当前时间:Y-m-d H:i:s');
echo "<br/>";
if(mysqli_connect('localhost','root','123'))
{
echo "连接成功!";
}
else
{
echo "连接失败!";
}
?>
</body>
</html>
Second, the specific steps
1, in php.ini, set the position of the module php (look for keywords extension_dir), and the path to the configuration of php ext folder
2, php.ini, open the mysqli module (in fact, just remove the comments, keywords mysqli ).
3, install mysql database and configure it to!