8000 Get a stream without printing it immediately · Issue #45 · Grandt/PHPZip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Get a stream without printing it immediately #45
Open
@Rudloff

Description

@Rudloff

Hello,

I'm trying to get a Zip stream that I can manipulate.
I can't use ZipStream because it prints the stream instead of returning it.

I tried to use Zip::getZipFile() but it seems to close the stream as soon as I return it:

function getZipStream()
{
    $zip = new \PHPZip\Zip\File\Zip();
    $zip->addFile('foo', 'foo');
    $stream = $zip->getZipFile();
    var_dump(is_resource($stream)); //bool(true)
    return $stream;
}

var_dump(is_resource(getZipStream())); //bool(false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0