[Typo3-debian] Up to date Debian packages available

Michael Stucki michael at typo3.org
Tue Dec 6 15:25:11 CET 2005


Much easier since every server does have zip but probably not all have this 
PHP extension:

$cmd = $exec_path.'unzip "/tmp/test1.zip" content.xml';
exec($cmd);

$content = readfile('/tmp/test1.zip');
unlink('/tmp/test1.zip');

- michael

> Needs zip to be enabled in PHP:
>
> <?php
>
> # Open zip file and get content
> # $archive	-> zip archive
> # $content	-> content of oo document
>
> $archive = '/tmp/test1.zip';
>
> $zip = zip_open($archive);
>
> if ($zip) {
> 	while ($zip_entry = zip_read($zip)) {
> 		if (zip_entry_name($zip_entry) == 'content.xml') {
> 			if (zip_entry_open($zip, $zip_entry, "r")) {
> 				$content = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
> 				zip_entry_close($zip_entry);
> 				}
> 			}
> 		}
> 	zip_close($zip);
> 	}
> echo $content. "\n";
> ?>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-debian/attachments/20051206/f3ae7d7b/attachment.pgp 


More information about the TYPO3-debian mailing list