Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8597093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:50:09+00:00 2026-06-12T00:50:09+00:00

I try to open a ZIP archive from a variable instead of a file

  • 0

I try to open a ZIP archive from a variable instead of a file in PHP.

That means there is a file or a MySQL query, I read into a variable $zip_contents or so.
This variable should be passed to a method like ZipArchive::open() instead of the filename.

Is this somehow possible or am I on the wrong track?

Kind regards

zoku

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:50:10+00:00Added an answer on June 12, 2026 at 12:50 am

    Can you afford little patching of an existing class which unzipps a file? For example, there is a simple solution, involving phpMyAdmin distribution, specifically look into the libraries subdirectory. It contains unzip.lib.php (GPL). The function ReadFile can be easily patched to accept a variable because it reads the file in the first lines and then work with this data. So it only needs to be changed for accepting the data directly.

    Here is the direct link to the class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

when I try to open a file for reading in my console application i
When I try to open a file in write mode with the following code:
Whenever I try to open a file with ifstream, it compiles fine, but will
ZipFileToCreate = c:\user\desktop\webservice\file.zip; So, when i try to save this file it creates the
I'm trying to create a .zip file from an asset from another server like
I have inherited an old application that stores a zip file in a database
I have a little php, application or whatever that opens a zip and reads
I am FTPing a zip file from a remote FTP site using Python's ftplib.
I'm generating a zip file from a collection of images which is then sent
I created a small application to read some files from the disk and zip

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.