php.ini provided mysql database module

php.ini provided mysql database module

A, mysql test code

1, in G: \ php \ wamp \ Apache24 \ htdocs folder, document hello.php established, as follows:
Here Insert Picture Description
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
Here Insert Picture Description
Here Insert Picture Description
2, php.ini, open the mysqli module (in fact, just remove the comments, keywords mysqli ).
Here Insert Picture Description
Here Insert Picture Description
3, install mysql database and configure it to!

Published 18 original articles · won praise 4 · Views 558

Guess you like

Origin blog.csdn.net/weixin_45538576/article/details/104636888