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)把加密好的文件放到服務器上運行。
總結
以上是生活随笔為你收集整理的php beast linux安装,windows centos php-beast 安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c++和python有联系吗_Pytho
- 下一篇: java oracle数据库连接代码,j