有的項目知識產權是歸自己的,只是授權客戶使用,此時就需要對PHP代碼做個混淆,不能直接把腳本源代碼部署到客戶服務器。
cd /usr/share git clone https://git.oschina.net/splot/php-screw-plus.git cd ./php-screw-plus phpize ./configure --with-php-config=/usr/bin/php-config php_screw_plus.h 修改#define CAKEY "..." 中的CAKEY,使用新的隨機字符串 make cd ./tools make vim /etc/php/7.0/fpm/php.ini 加入插件信息 extension=/usr/share/php-screw-plus/modules/php_screw_plus.so 在/usr/share/php-screw-plus/tools目錄中執行 ./screw [project_dir] 加密 ./screw [project_dir] -d 解密
參考文獻: