Jump to content

[SOLVED] Zip Extension


br0ken

Recommended Posts

I'm creating a log file on the fly. This information is then added to a zip folder using the addFromString() method.

 

This works fine for a small sized log file (about 200 chars) but any thing bigger and the Zip folder refuses to extract. Any one have any idea why this could be?

 

Here is my code:

 

	$path	= GetVar("CMS_DIR_BACKUP_DATA");
$zip	= new ZipArchive();
$res	= $zip->open($path.$fname.".zip", ZIPARCHIVE::CREATE);

if ($res === true)
{
	$zip->addFromString($fname.".txt", $content);
	$zip->close();
}

Link to comment
https://forums.phpfreaks.com/topic/148798-solved-zip-extension/
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.