Centos6.4下bcomplier庫加密PHP程式的例子

來源:互聯網
上載者:User


項目中需要對某些PHP檔案進行加密,這裡選用PHP PECL中的bcompiler庫,可以使用phpize編譯動態庫或直接使用pecl命令(需要安裝php-pear)。

系統是:

[root@li382-196 ~]# cat /etc/centos-release
CentOS release 6.4 (Final)
[root@li382-196 ~]# uname -i
x86_64

PHP版本為:

[root@li382-196 ~]# php -v
PHP 5.3.28 (cli) (built: Dec 18 2013 19:46:57)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

第一種方法,使用pecl命令:

1. 搜尋php-pear安裝包:

[root@li382-196 ~]# yum search php53 | grep pear
php53u-pear.noarch : PHP Extension and Application Repository framework

2. 安裝php53u-pear:

[root@li382-196 ~]# yum install php53u-pear

3. 安裝完畢後,可以測試pecl命令:

[root@li382-196 ~]# pecl help
Commands:
build                  Build an Extension From C Source
bundle                 Unpacks a Pecl Package
channel-add            Add a Channel
channel-alias          Specify an alias to a channel name
channel-delete         Remove a Channel From the List
channel-discover       Initialize a Channel from its server
channel-info           Retrieve Information on a Channel
channel-login          Connects and authenticates to remote channel server
channel-logout         Logs out from the remote channel server
channel-update         Update an Existing Channel
clear-cache            Clear Web Services Cache
config-create          Create a Default configuration file
config-get             Show One Setting
config-help            Show Information About Setting
config-set             Change Setting
config-show            Show All Sett

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.