网站的功能和特色,wordpress七牛w3tc加速,西安微信网站开发,建筑模板厂家联系方式推荐使用 php-bease 这个免费开源方案。 有一说一#xff0c;这个项目上次更新时间是2021年…
多好的项目呀。
作者说在 php5.1 ~ php7.2 上都测试过。
源码地址#xff1a; C源码#xff1a; https://github.com/liexusong/php-beast dll版#xff1a; https://github… 推荐使用 php-bease 这个免费开源方案。 有一说一这个项目上次更新时间是2021年…
多好的项目呀。
作者说在 php5.1 ~ php7.2 上都测试过。
源码地址 C源码 https://github.com/liexusong/php-beast dll版 https://github.com/imaben/php-beast-binaries/tree/master/php72
Windows上使用
安装
安装编译过程就没有了 dll 都给你了丢到 ext 目录里再在 php.ini 里加载它就行
使用
源码库里提供了 ./tools/encode_files.php 脚本文件 和 配套的 configure.ini
填一下 configure.ini
; source path
src_path F:\\Export\\source; destination path
dst_path F:\\Export\\source_Encrypt; expire time
expire 2099-12-31 23:59:59; encrypt type
encrypt_type DES然后跑一下encode_files.php脚本
# Shell
cd F:
cd php-beast-master\tools
D:/php7/php.exe -c D:/php7/php.ini ./encode_files.php脚本就会把 指定目录里的所有 php 文件加密输出到 输出目录 里文件名不变。
加密后的 php 文件可以照常使用但不可直接读 —— 显示乱码。
估计这个扩展的解密特性生效在解释 PHP 源码之前 解释器准备解释 a.php 发现是密文bease解密将解密后的内容交给 解释器继续解释。
问题 Windows上都用这个 dll 说明大家用的是同一个密钥呢如何定制密钥呢 还是得学习下怎么把 bease 源码重新编译成 dll
Linux上使用
安装
下载bease的C语言源码手动编译成扩展得到 xx.so
wget https://github.com/liexusong/php-beast/archive/master.zip
unzip master.zip
cd php-beast-master
phpize
./configure
make make install修改 php.ini 加载这个 xx.so 一般不需要编译后会自动加载上
使用 使用附带的 encode_files.php 或 encode_file.php 脚本 加密你想要加密的文件 使用加密的文件替换原文件照常使用就行 可以调整密钥请参考源码首页的说明