如何在Windows IIS服务器上安装mysqli? [英] how to install mysqli on windows iis server?
问题描述
我正在尝试在远程Windows服务器上运行mysqli,并且不断收到此错误
I am trying to run mysqli on my remote windows server and I keep getting this error
致命错误:调用未定义函数mysqli_connect()
Fatal error: Call to undefined function mysqli_connect()
我假设远程服务器上未安装mysqli.因此,如何在远程服务器上安装mysqli.
I assume mysqli is not installed on my remote server. So how do I install mysqli on my remote server.
推荐答案
mysqli
是PHP扩展.因此,您要做的就是在php.ini
文件中启用该扩展名.
mysqli
is a PHP extension. So all you have to do is enable that extension in your php.ini
file.
取消注释:
;extension=php_mysqli.dll
收件人:
extension=php_mysqli.dll
如果使用共享托管帐户,则可能必须创建一个.htaccess
并将其指向您自己的php.ini
副本.
If using a share hosting account, you may have to create a .htaccess
and point it to your own copy of php.ini
.
为此,您可以尝试以下操作:
To do that, you could try the following:
-
如果将php作为模块安装:在
.htaccess
中放入SetEnv PHPRC /location/todir/containing/phpinifile
如果将php作为cgi扩展安装,请将您的php.ini
放在cgi-bin
文件夹中.
If php is installed as a cgi extension, put your php.ini
in the cgi-bin
folder.
对于某些主机,您也可以将php.ini
放在通常放置.htaccess
文件的文件夹中.
For some hosts, you can also just put your php.ini
in the folder where you would usually put your .htaccess
files.
这篇关于如何在Windows IIS服务器上安装mysqli?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!