So, I have a very confusing problem with a client's php script. The problem basically is that MySQLi is connecting to another server, not the server that I specified in the code . Here is my code:
<?php
$list = ['0','137.74.186.210', '137.74.186.211', '137.74.186.212'];
foreach ($list as $value) {
if ($value == '0') {
continue;
}
echo "<br><h2><strong>Connecting to {$value}</strong></h2><br>";
$mysqli_connection = new MySQLi($value,"root","PASSWORD","LHskywars");
if ($mysqli_connection->connect_error) {echo "Not connected, error: " . $mysqli_connection->connect_error;}else{echo "Connected.";}
}
?>
The access of the server 1 ("137.74.186.211") was not allowed to the server 2 ("137.74.186.212").
-.-
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.