PHP目录下php-config的作用

WBOY
Release: 2016-06-23 13:58:38
Original
1796 people have browsed it

1. php-config简介


php安装完后在bin目录下有个php-config。

php-config是一个脚本文件。用于获取所安装的php配置的信息。


2. 使用场景


在编译php扩展时,使用下面命令用于指定php-config的路径。

./configure --with-php-config=/home/gang/php/bin/php-config 
Copy after login

3. php-config使用选项


在命令行执行

$ ./php-config 
Copy after login

返回所有选项:

Options:  --prefix            [...] PHP 所安装的路径前缀  --includes          [...] 列出用 -I 选项包含的所有文件  --ldflags           [...] PHP 编译时所使用的 LD 标志  --libs              [...] PHP 编译时所附加的库  --extension-dir     [...] 扩展库的默认路径  --include-dir       [...] 头文件的默认路径前缀  --php-binary        [...] PHP CLI 或者 CGI 可执行文件的完整路径  --php-sapis         [...] 列出所有可用的 SAPI 模块  --configure-options [...] 重现当前 PHP 在编译时的配置选项  --version           [...] PHP 版本号  --vernum            [...] PHP 版本号,以整数表示
Copy after login

4. 查看php-config代码


php-config就是一个脚本文件,可以直接查看他的代码内容

vim php-config
Copy after login
可以看到里面的变量在安装php脚本时已经生成了。


From: http://blog.csdn.net/yonggang7/article/details/24106681



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!