Maison  >  Article  >  développement back-end  >  关于php与mysql扩展库的问题

关于php与mysql扩展库的问题

WBOY
WBOYoriginal
2016-06-06 20:43:451012parcourir

但在编译php时,对以下几个参数很是不解:

--with-mysql=mysql客户端连接库

--with-mysqli=mysql客户端连接库

--with-pdo-mysql=mysql客户端连接库
--with-mysql 的作用是什么?
如果编译的时候不使用--with-mysql等等有什么弊端?
还有如果web服务器没装mysql服务那这个编译配置岂不是很没用?
可否用 --enable-mysql等等这样的替代

回复内容:

但在编译php时,对以下几个参数很是不解:

--with-mysql=mysql客户端连接库

--with-mysqli=mysql客户端连接库

--with-pdo-mysql=mysql客户端连接库
--with-mysql 的作用是什么?
如果编译的时候不使用--with-mysql等等有什么弊端?
还有如果web服务器没装mysql服务那这个编译配置岂不是很没用?
可否用 --enable-mysql等等这样的替代

--with-mysql是MYSQL连接扩展 (面向过程)
--with-mysqli也是MYSQL连接扩展 (面向过程和面向对象)
--with-pdo-mysql还是MYSQL连接扩展,基于PDO (纯面向对象)
第一种已经快废弃了。

这些都是连接用的,和MYSQL安不安装没有关系,只和你用不用mysql有关啦

如果编译环境中没装mysql 可以使用 --with-mysql=mysqlnd
./configure --help 慢慢看

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn