繁体   English   中英

Mysqli_Connect 是一个未定义的 function

[英]Mysqli_Connect is an undefined function

我正在尝试用我的数据库填充我的服务器,但我一直遇到这个错误:调用未定义的 function mysqli_connect()

我在网上查看并编辑了我的 php.ini 文件以包含 extension=mysqli,如随附的屏幕截图所示在此处输入图像描述

我完全能够在 netbeans 中连接到我的数据库,我有点难过为什么这个 function 仍然未定义。

如果有人有任何其他方法,我可以采取这将非常感激:)

谢谢

你应该检查调试的东西。

  • 如果您在服务器运行时更改php.ini ,请重新启动服务器,因为每当您对php.ini进行更改时,都必须重新启动它才能生效。
  • Make sure that mysqli.dll or php_mysqli.dll for windows or php mysqli.so binary for linux or mac os, is existing in the ext folder on your php installation folder as you enabled it on your php.ini .
  • In the past I have multiple PHP version installed on my machine, if you have the same scenario, make sure that your server (example: Apache, Nginx) is pointing the correct PHP version you want to use where you also configured your php.ini .

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM