Tuesday, 3 January 2017

laravel - Get Unzipped Folder Path - PHP

How can i get the zipped file folder name after unzipping in php.



$zip = new \ZipArchive();


$zip->open(storage_path('app/'.$request->vrfile));

$zip->extractTo(public_path('tour_videos/videos/'.str_slug($company)));
$zip->close();

unlink(storage_path('app/'.$request->vrfile));


Zipped file is called Kigali Home Web Tour




enter image description here



And After Unzipping the file the folder name is Web Tours



enter image description here



How can i get the folder name after extracting zipped files??

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...