아래 코드는 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 />";
}
?>