Jump to content

Writing files to .GZ


Nordskjold

Recommended Posts

Hey, I have for some time been working on a php gallery, and now i need to scan a dir and write all the jpg's from the dir to a .gz file.. The problem is that I've only succeeded writing strings..

 

 

$gz = gzopen('test.gz', 'w9');
$dir = opendir("test");
while (($file = readdir($dir)) != false)
{
if ($file == "." || $file == "..");
else
{
	gzputs ($gz, $file);
}
}

closedir($dir);
gzclose($gz);

 

 

In advanced, thank you :)

Link to comment
https://forums.phpfreaks.com/topic/164453-writing-files-to-gz/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.