我正在尝试为我的网站创建一个登录系统,但是每次尝试连接时都会失败。
<?php
$servername = "remotemysql.com";
$username = "no";
$password = "no";
// Create connection
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?>
应该可以连接,但只是说连接失败:连接超时