We have a php code that copies the contents of a zip file. The reason for using copy instead of extracting is that, we wanted the extracted files in the root folder instead of in a folder created by the extraction. Following is the section of the which copies the contents of the zip.
copy("zip://".$path1.$fname1."#".$fileName, $path1.$fileinfo['basename']);
This code is working fine a Windows machine. But not working in ubuntu. When i printed variable $path1.$fname1 , i got the following value /opt/lampp/htdocs/....upload_images/test.zip.
Is it an issue with the path?
The output of the entire string "zip://".$path1.$fname1."#".$fileName is
zip:///opt/lampp/htdocs/....upload_images/test.zip#KOHL0000055.jpg
as you can see there are 3 slashes after zip. So i tried removing one of the slashes but still no result.
I have checked the permission of the folder and its 777. And zip files getting uploaded but only the copy is not happening.
