php beast linux安装,windows centos php-beast 安装

https://github.com/imaben/php-beast-binaries

windows下 可以直接在这里下载dll

根据自己的php版本  还有是不是线程安全的 来选择下载对应的

放到对应的扩展目录 中

在配置文件 php.ini中加入扩展配置

放到对应的扩展目录 中

在配置文件 php.ini中加入扩展配置

extension=php_beast_x86_nts.dll

加密方案:

使用beast_encode_file()函数加密文件,函数原型如下:

beast_encode_file(string $input_file, string $output_file, int expire_timestamp, int encrypt_type)。

1. $input_file: 要加密的文件

2. $output_file: 输出的加密文件路径

3. $expire_timestamp: 文件过期时间戳

4. $encrypt_type: 加密使用的算法(支持:BEAST_ENCRYPT_TYPE_DES、BEAST_ENCRYPT_TYPE_AES)

echo beast_encode_file('D:\phpStudy\WWW\phpinfo.php','D:\phpStudy\WWW\z.php');/**要加密的文件路径,加密后的文件路径*/

centos配置php-beast扩展

1)安装

$ wget https://github.com/liexusong/php-beast/archive/master.zip

$ unzip master.zip

$ cd php-beast-master

$ phpize

$ ./configure

$ make

$ sudo make install

2)修改php.ini 添加配置:extension=beast.so

3)重启服务器

4)加密PHP文件 使用模块提供的beast_encode_file($input_file, $output_file);来加密文件,$input_file为要加密的文件,$output_file为要输出的加密文件。

5)把加密好的文件放到服务器上运行。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值