PHP开启mysqli扩展
Call to undefined function mysqli_connect()
解决这个问题需要开启mysqli扩展
开启mysqli扩展需要这两个步骤缺一不可
1.在php.ini中搜索php_mysqli.dll
2.设置extension_dir指令
; Windows Extensions ; Note that ODBC support is built in, so no dll is needed for it. ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+) ; extension folders as well as the separate PECL DLL download (PHP 5+). ; Be sure to appropriately set the extension_dir directive. ;一定要适当地设置extension_dir指令。
在php.ini里面搜索extension_dir
(注意这里不能填写相对路径,在我的环境中测试填相对路径无效)
extension_dir = “G:/web/php7.1/ext”
检查G:/web/php7.1/ext安装路径是否存在php_mysqli.dll(如果不存在应该是PHP安装包损坏,请重新下载)
3.开启成功
原文:https://blog.csdn.net/qq_34804120/article/details/78866165