The system was in a reseller and I had to migrate to a VPS with Cpanel, the script to generate the XLS was working fine, opened and downloaded, but now it just opens on the screen
What do I need to enable to work properly?
$html = '<table>
<tr>
<td>Coluna 1</td>
<td>Coluna 2</td>
<td>Coluna 2</td>
</tr>
<tr>
<td>Coluna 1</td>
<td>Coluna 2</td>
<td>Coluna 2</td>
</tr>
<tr>
<td>Coluna 1</td>
<td>Coluna 2</td>
<td>Coluna 2</td>
</tr>
</table>';
// Configurações header para forçar o download
header ("Expires: Mon, 26 Jul 1997 05: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=\"nome_arquivo.xls\"" );
header ("Content-Description: PHP Generated Data" );
echo $html;