unzip_file()解压缩zip文件

目录

描述

Unzip's a specified ZIP file to a location on the Filesystem via the WordPress Filesystem Abstraction.Assumes that WP_Filesystem() has already been called and set up. Does not extract a root-level __MACOSX directory, if present.

Attempts to increase the PHP Memory limit to 256M before uncompressing, However, The most memory required shouldn't be much larger than the Archive itself.

unzip_file() 描述

用法

<?php unzip_file$file$to ); ?>

unzip_file() 用法

参数

$file

(string) (必填) Full path and filename of zip archive

默认值: None

$to

(string) (必填) Full path on the filesystem to extract archive to

默认值: None

unzip_file() 参数

返回值

(mixed

WP_Error on failure, True on success

unzip_file() 返回值

历史

添加于 版本: 2.5

unzip_file() 历史