-1
下面的代码在使用MAMP的旧iMac上工作。但是,它不适用于我的新iMac。我该如何解决?我需要对php.ini
文件做些什么吗?mysqli_connect不能在MAMP上工作
<?php
$dbConnection = mysqli_connect("localhost", "xxxx", "xxxx", "gallery");
$query = "SELECT * FROM images";
$stmt = mysqli_prepare($dbConnection,$query);
mysqli_stmt_execute($stmt);
mysqli_stmt_bind_result($stmt, $id, $categories,$img_name);
while (mysqli_stmt_fetch($stmt)) {
echo $id."<br />";
}
?>