1. 程式人生 > >PHP開啟mysqli擴充套件

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