mysqli无法正常工作,找不到模块

时间:2013-01-20 23:06:35

标签: php apache

我是PHP和Web服务器的新手,我打算用PHP创建一个网站。我找到了一个使用mysqli的免费登录脚本。每次我在页面上都说我没有mysqli?我用PHP3运行Apache。因此脚本的mysqli部分是:

// if the connection is successfully established
if($conn = new mysqli($this->conn_datas['localhost'], $this->conn_datas['daztestc_testdaz'], $this->conn_datas['dj2403ms81'], $this->conn_datas['daztestc_daztest'])) {
  $sql = "SET NAMES 'utf8'";
  $conn->query($sql);
  $this->conn = $conn;          // add the connection in the $conn property
}

2 个答案:

答案 0 :(得分:4)

PHP3? mysqli直到php5才被引入。你在哪里找到一个具有如此旧的PHP副本的服务器?并且任何代码都有效吗?因为自php3以来大多数事情都发生了变化。

答案 1 :(得分:0)

可能您没有安装MySQLI扩展程序。检查this page以了解如何启用它。啊......当然......你不能在PHP3上使用它...所以如果你真的想要,请升级你的服务器。