0
When I export the data the UTF-8 is not acting, how can I solve this?
// Formatação do header do arquivo
header ("Expires: Mon, 18 Nov 1985 18:00:00 GMT");
header ("Last-Modified: ".gmdate("D,d M YH:i:s")." GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
header ("Content-type: application/x-msexcel");
header ("Content-Disposition: attachment; filename=Dados.xls");
header ("Content-Type: text/html; charset=UTF-8");
echo "\xEF\xBB\xBF";
?>
<table>
<thead>
<tr>
<th>Fazenda</th>
<th>Talhão</th>
<th>Data</th>
<th>Deficit (mm)</th>
<th>Irrigação (mm)</th>
<th>Irrigação (h)</th>
<th>Velocidade (%)</th>
<th>Pluviometria (mm)</th>
<th>Temp Min (°C)</th>
<th>Temp Med (°C)</th>
<th>Temp Max (°C)</th>
</tr>
</thead>
<tbody>
<?php
while ($Dado = $conexao->busca($Dados))
{
?>
<tr>
<td><?=$Dado['Nome_Fazenda']?></td>
<td><?=$Dado['Nome_Parcela']?></td>
<td><?=$Dado['Data_Irr']?></td>
<td><?=$Dado['Deficit']?></td>
<td><?=$Dado['IrrMM']?></td>
<td><?=$Dado['IrrHS']?></td>
<td><?=$Dado['Velocidade']?></td>
<td><?=$Dado['Pluviometria']?></td>
<td><?=$Dado['Temp_Min']?></td>
<td><?=$Dado['Temp_Med']?></td>
<td><?=$Dado['Temp_Max']?></td>
</tr>
<?php
}
?>
</tbody>
the problem occurs in the elements that come from the comic or all, including the ones that you typed by hand?
– Wees Smith
in all, I’ll put an image for you to see how it looks, still comes a symbol at the beginning.
– joão victor fernandes
@Weessmith made the change.
– joão victor fernandes
have something before these headers?
– Wees Smith
Yes, a query to search in the $data variable.
– joão victor fernandes
the headers have to be the first of everything, puts them isolated at the top of the page just below <php?
– Wees Smith