PHP目錄下php-config的作用

來源:互聯網
上載者:User

1. php-config簡介


php安裝完後在bin目錄下有個php-config。

php-config是一個指令檔。用於擷取所安裝的php配置的資訊。


2. 使用情境


在編譯php擴充時,使用下面命令用於指定php-config的路徑。

./configure --with-php-config=/home/gang/php/bin/php-config 

3. php-config使用選項


在命令列執行

$ ./php-config 

返回所有選項:

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 版本號碼,以整數表示

4. 查看php-config代碼


php-config就是一個指令檔,可以直接查看他的代碼內容

vim php-config
可以看到裡面的變數在安裝php指令碼時已經產生了。


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

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.