简体   繁体   中英

why php ziparchive's extractTo method creates one-depth-level, instead folders tree? (folders names are cyrillic)

I Working with web server that works on unix.

I have zip archive which contains some folders tree:

section1
**subsection1-1
**subsection2-2

section2
**subsection2-1

All section's names are on cyrillic .

When i try to extract this archive by using $zip->extractTo(...) , i get only one depth level of sections.

section1
subsection1-1
subsection1-2
section2
subsection2-1

(same situation with nested files. they appears at the root level instead parent level)

I Fixed. The reason was: that my zip archive with folders was created by php's ziparchive on windows server. And when it was created - the local names of files and folders was with "\" separator. And i tried to export it on unix's server;

I fixed code of creating zip, by replacing "\" to "/" and it works fine now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM