function ProcessUploadedHAR($testPath) { // From the mobile agents we get the zip file with sub-folders if (isset($_FILES['file'])) { logMsg(" Extracting uploaded file '{$_FILES['file']['tmp_name']}' to '{$testPath}'\n"); if (preg_match("/\\.zip\$/", $_FILES['file']['name'])) { ZipExtract($_FILES['file']['tmp_name'], $testPath); } else { move_uploaded_file($_FILES['file']['tmp_name'], $testPath . "/" . $_FILES['file']['name']); } } ProcessHARText($testPath, false); }
<?php include 'common_lib.inc'; ZipExtract('C:/Users/pmeenan/Desktop/test/test.zip', 'C:/Users/pmeenan/Desktop/test/extracted', true);