关闭先前打开的数据库连接:
<?PHP $con=mysqli_connect("localhost","my_user","my_password","my_db");// ....some PHP code... mysqli_close($con); ?>
mysqli_close() 函数关闭先前打开的数据库连接。
mysqli_close(connection);