Path: C:\
<?php
$arquivo1="NotasXML/nf-".$nrNF."_1.xml";
error_reporting(E_ALL);
ini_set('display_errors', 'On');
ini_set('max_execution_time', 2000); //300 seconds = 5 minutes
require ('vendor/autoload.php');
use NFePHP\NFe\Common\Standardize;
try {
$response = file_get_contents($arquivo1);
$stz = new Standardize($response);
$std = $stz->toStd();
$zip = $std->loteDistDFeInt->docZip;
$xml = gzdecode(base64_decode($zip));
$stdCl = new Standardize($xml);
$arquivo2="NotasXML/nf-".$nrNF.".xml";
header('Content-type: text/xml; charset=UTF-8');
file_put_contents($arquivo2,$stdCl);
include 'exibe_danfe.php';
} catch (\Exception $e)
{ $erro='Erro na MontaXML: '. $e->getMessage(); }
?>