我的代码如下
$dbhost = 'example.com';
$dbuser = 'dbusername';
$dbpass = 'dbpassword';
$dbName='dbname';
$conn = new mysqli($dbhost, $dbuser, $dbpass, $dbName);
// check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
在我执行代码后出现错误 连接失败:连接被拒绝 警告:mysqli :: __construct():(HY000/2002):第8行/home/public_html/test/remote.php中的连接超时连接失败:连接超时