修复"打包文件时会将整个完整路径结构塞进压缩包内"问题
*之前没怎么注意这个问题
This commit is contained in:
parent
b3f7cd6f45
commit
160367c160
@ -594,7 +594,7 @@ class HomeController extends Controller
|
|||||||
if (!file_exists($absolutePath)) {
|
if (!file_exists($absolutePath)) {
|
||||||
throw new NotFoundHttpException('The requested file does not exist.');
|
throw new NotFoundHttpException('The requested file does not exist.');
|
||||||
}
|
}
|
||||||
$absolutePaths[] = $absolutePath;
|
$absolutePaths[basename($absolutePath)] = $absolutePath;
|
||||||
}
|
}
|
||||||
$zipPath = Yii::getAlias(Yii::$app->params['dataDirectory']) . '/' . Yii::$app->user->id . '/' . $targetDirectory . '/' . $model->zipFilename . '.' . $model->zipFormat;
|
$zipPath = Yii::getAlias(Yii::$app->params['dataDirectory']) . '/' . Yii::$app->user->id . '/' . $targetDirectory . '/' . $model->zipFilename . '.' . $model->zipFormat;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user