Core Function
View Source on Trac ↗ unzip_file()
unzip_file( mixed $file, mixed $to ) Unzips a specified ZIP file to a location on the filesystem via the WordPress
Parameters 2 required
| Name / Type | Description |
|---|---|
| $file string | Full path and filename of ZIP archive. Required |
| $to string | Full path on the filesystem to extract archive to. Required |
Return Value
((true)
| WP_Error) True on success, WP_Error on failure.
Function Information
Since Version
2.5.0
Source File
wp-admin/includes/file.php
Advertisement