php 加密压缩
php 把文件打成压缩包 ,可以去搜下 pclzip
搜很好多地方没有找到对压缩包进行加密操作的。
如果服务器是linux 那么见代码:
$filename="test.csv"; file_put_contents($filePath,"1\t 2\t 3\n1\t 2\t 3\n1\t 2\t 3\n"); //$test = "/bin/bash /usr/local/inonesoft/bin/atest.sh 123 /usr/local/inonesoft/nginx/htdocs/watch/test.zip /usr/local/inonesoft/nginx/htdocs/watch/test.csv"; $test = "ln /usr/local/inonesoft/nginx/htdocs/watch/test.csv /test.csv; /usr/local/inonesoft/bin/atest.sh 123 - /test.csv > /usr/local/inonesoft/nginx/htdocs/watch/test.zip"; exec($test,$array);
atest.sh:
#zip -rP a123 text.zip test.txt zip -rP $1 $2 $3