欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          詳解mac下pecl的擴(kuò)展配置(附代碼實(shí)例)

          本篇文章給大家?guī)砹岁P(guān)于PHP的相關(guān)知識(shí),其中主要跟大家介紹有關(guān)mac下pecl的擴(kuò)展配置,本文是基于php7.4的,感興趣的朋友下面一起來看一下吧,希望對(duì)大家有幫助。

          詳解mac下pecl的擴(kuò)展配置(附代碼實(shí)例)

          mac 下 pecl 的 擴(kuò)展配置 ( 基于php7.4 )

          環(huán)境確認(rèn)

          如果你的php是通過brew安裝的,一般情況下是帶了pecl的。

          $ pecl version PEAR Version: 1.10.13 PHP Version: 7.4.28 Zend Engine Version: 3.4.0
          登錄后復(fù)制

          如果沒有,可以通過以下腳本安裝。

          安裝腳本

          $ curl -O https://pear.php.net/go-pear.phar $ sudo php -d detect_unicode=0 go-pear.phar
          登錄后復(fù)制

          pecl配置

          查看pecl的相關(guān)配置

          $ pecl config-show
          登錄后復(fù)制

          這里可以看到pecl的默認(rèn)擴(kuò)展目錄

          PEAR executables directory     bin_dir          /opt/homebrew/lib/php/pecl/bin PEAR documentation directory   doc_dir          /opt/homebrew/share/pear@7.4/doc PHP extension directory        ext_dir          /opt/homebrew/Cellar/php@7.4/7.4.28_1/lib/php/20190902PEAR directory                 php_dir          /opt/homebrew/share/pear@7.4PEAR Installer cache directory cache_dir        /private/tmp/pear/cache PEAR configuration file        cfg_dir          /opt/homebrew/lib/php/pecl/cfg
          登錄后復(fù)制

          到擴(kuò)展目錄看以下

          /opt/homebrew/Cellar/php@7.4/7.4.28_1/ [master*] ls -all | grep pecl lrwxr-xr-x   1 yuan  admin      26  3 30 20:21 pecl -> /opt/homebrew/lib/php/pecl
          登錄后復(fù)制

          很明顯 安裝擴(kuò)展.so文件的目錄是 /opt/homebrew/Cellar/php@7.4/7.4.28_1/pecl,此目錄實(shí)際上是軟鏈接到了 /opt/homebrew/lib/php/pecl 。

          目錄配置

          查看php的擴(kuò)展目錄

          $ php -i | grep extension_dir extension_dir => /opt/homebrew/lib/php/pecl/20190902
          登錄后復(fù)制

          比如我安裝了一個(gè) yaml.so 擴(kuò)展。
          直接在 /opt/homebrew/etc/php/7.4/php.ini 中添加一行 yaml.so,會(huì)自動(dòng)在
          /opt/homebrew/lib/php/pecl/20190902/yaml.so 找到軟連接到 /opt/homebrew/Cellar/php@7.4/7.4.28_1/pecl/20190902/yaml.so 的原始擴(kuò)展。

          推薦學(xué)習(xí):《PHP視頻教程》

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)