-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 />";
}
?>