如何在Windows IIS服务器上安装mysqli? [英] how to install mysqli on windows iis server?

查看:137
本文介绍了如何在Windows IIS服务器上安装mysqli?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在远程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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆