Untitled
unknown
php
a year ago
652 B
5
Indexable
<?php
foreach ($arrDados as $cnpj => $documentos) {
foreach ($documentos as $tipo => $listaDocumentos) {
foreach ($listaDocumentos as $documento) {
$objZip->addFromString(
sprintf(
'%s/%s/%s',
$cnpj,
$tipo.'-e',
$documento['nome_arquivo']
),
$documento['conteudo']
);
}
}
}
$objZip->close();
ob_clean(); flush();
header('Content-Type: application/zip');
header("Content-Transfer-Encoding: Binary");
header("Content-Length: ".filesize($local_zip));
header('Content-Disposition: attachment; filename=notas.zip');
readfile($local_zip);
exit;Editor is loading...
Leave a Comment