在此php配置中启用了mysqli扩展吗? [英] Is mysqli extension enabled in this php configuration?

查看:73
本文介绍了在此php配置中启用了mysqli扩展吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用phpi设计的网站,扩展名为mysqli(改进mysql). phpinfo()页面显示以下内容:

I've a website designed in php with mysqli (mysql - improved) extension. The phpinfo() page shows this:

./configure --disable-fileinfo --disable-phar --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-magic -quotes --enable-mbstring --enable-pdo = shared --enable-soap --enable-sockets --enable-wddx --enable-zend-multibyte --enable-zip --prefix =/usr --with -bz2 --with-curl =/opt/curlssl/--with-curlwrappers --with-freetype-dir =/usr --with-gd --with-imap =/opt/php_with_imap_client/--with-imap- ssl =/usr --with-jpeg-dir =/usr --with-kerberos --with-libdir = lib64 --with-libexpat-dir =/usr --with-libxml-dir =/opt/xml2- with-libxml-dir =/opt/xml2/--with-mcrypt =/opt/libmcrypt/--with-mysql =/usr --with-mysql-sock =/var/lib/mysql/mysql.sock- with-mysqli =/usr/bin/mysql_config --with-openssl =/usr --with-openssl-dir =/usr --with-pcre-regex =/opt/pcre --with-pdo-mysql = shared- -with-pdo-sqlite = shared --with-pic --with-png-dir =/usr --with-pspell --with-sqlite = shared --with-tidy =/opt/tidy/--with- xmlrpc --with-xpm-dir =/usr --with-xsl =/opt/xslt/--with-zlib --with-zlib- dir =/usr

./configure --disable-fileinfo --disable-phar --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-magic-quotes --enable-mbstring --enable-pdo=shared --enable-soap --enable-sockets --enable-wddx --enable-zend-multibyte --enable-zip --prefix=/usr --with-bz2 --with-curl=/opt/curlssl/ --with-curlwrappers --with-freetype-dir=/usr --with-gd --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libdir=lib64 --with-libexpat-dir=/usr --with-libxml-dir=/opt/xml2 --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=/usr/bin/mysql_config --with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-pic --with-png-dir=/usr --with-pspell --with-sqlite=shared --with-tidy=/opt/tidy/ --with-xmlrpc --with-xpm-dir=/usr --with-xsl=/opt/xslt/ --with-zlib --with-zlib-dir=/usr

这是否意味着在此配置中启用了mysqli扩展?

Does this mean that mysqli extension is enabled in this configuration?

推荐答案

应该启用mysqli扩展名,然后在相同的phpinfo页面上使用" MysqlI支持|启用"表标题应该出现.寻找那个:

Should the mysqli extension be enabled then on the very same phpinfo page a "MysqlI Support | enabled" table header should appear. Look for that:

如果要在脚本中查找,请查找特定于mysqli的函数,例如 ,然后检查其是否存在:

If you want to find out in a script, look for a function specific for mysqli like mysqli_connect() and than check if it exists:

var_dump(function_exists('mysqli_connect'));

如果输出为FALSE,则说明它不存在,很可能无法使用该模块.

If this outputs FALSE, then it does not exists and it's highly likely that you can not use the module.

这篇关于在此php配置中启用了mysqli扩展吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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