数据库
首页 > 数据库> > php – Mysqli:未知的服务器主机

php – Mysqli:未知的服务器主机

作者:互联网

似乎这是一个非常常见的错误,但我不能解决它.我正在运行PHP 5.3.1
外部MySQL服务器5.5.8 – 都安装了Phpmyadmin并运行Windows Server 2k8R2.

当我尝试以下内容时:

   $connection = new mysqli("myhost.com:3306", "myUser", "myPwd", "myDB");
   $result = $connection->prepare("SELECT * FROM tt_staff
                           WHERE crew_type = ?
                           AND inaktiv_vakt = 0
                           ORDER BY ansvarlig_vakt DESC, crew_type, navn_vakt");
   $result->bind_param("s", $value);
   $result->execute();
   $result->bind_result($value, $name);

我得到了“
警告:mysqli :: mysqli()[mysqli.mysqli]

标签:php,mysql,mysqli,phpmyadmin,windows-server-2008
来源: https://codeday.me/bug/20190713/1444791.html