Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获取解压缩文件夹路径-PHP_Php_Laravel_Zip_Unzip - Fatal编程技术网

获取解压缩文件夹路径-PHP

获取解压缩文件夹路径-PHP,php,laravel,zip,unzip,Php,Laravel,Zip,Unzip,在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))

在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));
压缩文件名为Kigali Home Web Tour

解压缩文件后,文件夹名为Web Tours

解压缩文件后如何获取文件夹名称??

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

$name将为您提供文件夹的绝对路径和名称。

webtours
zip文件中的公司名称还是文件夹名称?创建名称为的文件夹(您需要)。。复制该文件夹中的zip文件。。。转到该路径解压文件