HF RL Explorer

Task: Recursively Zip a Directory in PHP

Task: Recursively Zip a Directory in PHP: a task in Terminal-Lego-15k (Harbor dataset). Create a PHP script that recursively zips a directory structure, preserving the complete directory hierarchy and all files within subdirectories. The script should handle nested directories and produce a valid…

The task

Create a PHP script that recursively zips a directory structure, preserving the complete directory hierarchy and all files within subdirectories. The script should handle nested directories and produce a valid ZIP archive that can be extracted on any platform (Linux, macOS, Windows).

Part of PrimeIntellect/Terminal-Lego-15k.