【发布时间】:2019-01-13 03:04:43
【问题描述】:
$dir = "/var/www/html/test";
$localDir = "/home/hell/local/db";
$pass = "123456789";
$method = "aes-256-cbc";
$out = "/home/hell/Downloads/db;
$files = scandir($dir);
if (!empty($files)) {
foreach ($files as $file) {
if ($file != '.' && $file != '..') {
if (substr($file, 0, 11)== date('d-M-Y')) {
// code...
copy(".$dir."/".$file.",".$localDir."/".$file");
$zipName = basename($localDir."/".$file,".aes").".zip";
$exec = "openssl ".$method." -d -salt -in ".$localDir."/".$file." -out ".$out.$zipName. " -k ".$pass;
}
}
}
}
我的目标是将 .aes 文件从 /var/www/html/test 复制到 /home/hell/local/db > 然后解密它,然后解压缩并删除复制的文件及其 zip。 到目前为止,这就是我所管理的,代码运行时没有错误,但不会生成要解压缩的存档文件。它不会生成要解压缩的文件。
【问题讨论】: