本文實例講述了php使用pecl方式安裝擴展操作。分享給大家供大家參考,具體如下:
安裝pecl
cd /usr/local/php/bin/ wget http://pear.php.net/go-pear.phar -O go-pear.php php go-pear.php ##回車默認安裝
安裝php擴展
pecl search key-word #用于查找擴展 pecl install key-word #用于安裝擴展
查詢相關(guān)擴展
[root@localhost src]# pecl search swoole Retrieving data...0% Matched packages, channel pecl.php.net: ======================================= Package Stable/(Latest) Local swoole 1.8.12 (stable) 1.8.12 Event-driven asynchronous and concurrent networking engine with high performance for PHP. [root@localhost src]# pecl search xdebug Retrieving data...0% Matched packages, channel pecl.php.net: ======================================= Package Stable/(Latest) Local xdebug 2.4.1 (stable) Provides functions for function traces and profiling
安裝相關(guān)擴展
pecl install xdebug ##安裝完成之后,輸出 Build process completed successfully Installing '/usr/lib64/php/modules/xdebug.so' install ok: channel://pecl.php.net/xdebug-2.4.1 configuration option "php_ini" is not set to php.ini location You should add "zend_extension=/usr/lib64/php/modules/xdebug.so" to php.ini ##根據(jù)提示,我們在php.ini的最后添加 zend_extension=/usr/lib64/php/modules/xdebug.so pecl install swoole
更多關(guān)于PHP相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《PHP擴展開發(fā)教程》、《PHP網(wǎng)絡(luò)編程技巧總結(jié)》、《php curl用法總結(jié)》、《PHP數(shù)組(Array)操作技巧大全》、《PHP數(shù)據(jù)結(jié)構(gòu)與算法教程》、《php程序設(shè)計算法總結(jié)》及《php字符串(string)用法總結(jié)》
希望本文所述對大家PHP程序設(shè)計有所幫助。
標(biāo)簽:濮陽 黔東 廈門 海北 惠州 湘西 文山 梅河口
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《php使用pecl方式安裝擴展操作示例》,本文關(guān)鍵詞 php,使用,pecl,方式,安裝,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。