validateZipStructure.php
Table of Contents
Functions
- validateZipStructure() : bool
- Validates the internal structure of a zip file.
Functions
validateZipStructure()
Validates the internal structure of a zip file.
validateZipStructure(string $filePath) : bool
This function checks whether the given file is a valid, readable zip archive. It uses the ZipArchive class to attempt opening the archive and inspects a few entries to confirm structural integrity.
Parameters
- $filePath : string
-
Path to the zip file.
Tags
Return values
bool —True if the file has a valid zip structure, false otherwise.