dqeq885710 2012-04-30 22:40
浏览 287
已采纳

php在mysqli_fetch_array上显示空白和错误

I receive a blank page when I try connect to mysql, based on the error. php doesn't like the 3rd line

$link = "SELECT * FROM `Table` WHERE `id`='$id'";
$results = mysqli_query($db,$link);
$qdata = mysqli_fetch_array($results);

This code is working on my old server, so mysqli_fetch_array seems absolute? Or did I miss something else on my php config?

Thanks!

This is the error message Fatal error: Call to undefined function mysqli_connect() in /opt/php_script/connect.php on line 14

Line 14 is

$link = "SELECT * FROM `Table` WHERE `id`='$id'";
  • 写回答

2条回答 默认 最新

  • dougu5847 2012-04-30 23:32
    关注

    Your mysqli extendion is not enabled. Check your php.ini, go to the extensions part and enable it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?