<?php
$dbname = "testphp";
$password = 'allen_8pw';
$servername = 'localhost';
$username = 'allen';
if (!function_exists('mysqli_init') && !extension_loaded('mysqli')) {
echo 'do not have mysqli!!!!';
} else {
echo 'have it!!!';
};
$conn = new mysqli($servername, $username, $password);
if ($conn->connect_error) {
die('Connection failed:' . $conn->connect_error);
}
echo 'Connected successfully';
?>
网友评论