很多时候,我们编译安装完php之后,需要重新编译安装,但是原来的编译参数不记得了,通过php-config命令可以方便的重新获取,除此之外,php-config还有其他很多有用的功能。
下面我们就介绍一下php-config的其他功能:
Option Description
-- prefix Directory prefix where PHP is installed, e.g. /usr/local PHP安装的路径,即编译安装的prefix参数的取值 -- includes List of -I options with all include files -- ldflags LD Flags which PHP was compiled with -- libs Extra libraries which PHP was compiled with 编译使用到的外部库 -- extension-dir Directory where extensions are searched by default 扩展存放目录,pecl编译完之后可以去这个目录查看 -- include-dir Directory prefix where header files are installed by default 头文件路径 -- php-binary Full path to php CLI or CGI binary php二进制可执行文件目录 -- php-sapis Show all SAPI modules available -- configure-options Configure options to recreate configuration of current PHP installation php编译安装时的参数 -- version PHP version -- vernum PHP version as integer
php-config在我们重新编译安装php或者编译安装pecl扩展的时候很有用处,因为系统中可能同时存在好多版本的php,这个命令能帮我们准确的定位当前使用版本,能准确的查看php编译安装的信息。
相关推荐:
立即学习“PHP免费学习笔记(深入)”;
configure: error: Cannot find php-config.
以上就是php-config介绍 的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号