PHP Zip Archive - open or extractTo is not working -


I'm completely telling why this is not working. help! $ archive = "x.zip"; $ Zip = new zip archive (); $ Res = $ zip- & gt; Open ($ Collection); If ($ res === 'TRUE') {$ unzip_success = $ zip- & gt; ExtractTo ('/ temp /', "inscriptions.txt") $ zip- & gt; Close (); }

  • The target directory "temp" is "0777" permissions
  • The code received from $ res is "11" and is not required "TRUE" by documentation on PHP.net
  • Note: Full URL and extractTo

    for $ archive If none works, check if your server is Linux or not. If its Linux you can run the unzip command to open the file through the PHP system / exec function. I.e

      system ("unzip archive.zip");   

    To remove a specific file, you can see man docs for unzip. Due to the server parameter zip library, it does not work as often as it is expected in cases that I come back to the Linux command.

Comments