<?php
//加载类库
foreach(glob('LZCompressor/*') as $file){
require($file);
}
//加载class
use LZCompressor\LZString as LZString;
$code = '需要解密的字符串';
$code = LZString::decompressFromBase64($code);//解密
print_r($code);//输出字符串
echo "\n\n";
$code = '需要加密的字符串';
$code = LZString::compressToBase64($code);//加密
print_r($code);//输出字符串
<?php
//加载类库
foreach(glob('LZCompressor/*') as $file){
require($file);
}
//加载class
use LZCompressor\LZString as LZString;
$code = '需要解密的字符串';
$code = LZString::decompressFromBase64($code);//解密
print_r($code);//输出字符串
echo "\n\n";
$code = '需要加密的字符串';
$code = LZString::compressToBase64($code);//加密
print_r($code);//输出字符串