Ho creato una funzione che mi fa l'upload di un file xls (MS Excel). Il file viene uploadato correttamente. Ho uploadato file xls di prova e scaricandoli tutto corretto. Quando hanno caricato il file definitivo (caricamento corretto) se faccio per scaricarlo quando lo apro al posto dei dati vedo questi errori:
Warning: Unexpected character in input: ' in /web/htdocs/www.fiorenzuolapatrimonio.it/home/reserved/upload/listino.xls on line 57985
Warning: Unexpected character in input: ' in /web/htdocs/www.fiorenzuolapatrimonio.it/home/reserved/upload/listino.xls on line 57985
Warning: Unexpected character in input: ' in /web/htdocs/www.fiorenzuolapatrimonio.it/home/reserved/upload/listino.xls on line 57985
Warning: Unexpected character in input: ' in /web/htdocs/www.fiorenzuolapatrimonio.it/home/reserved/upload/listino.xls on line 57986
Parse error: syntax error, unexpected T_STRING in /web/htdocs/www.fiorenzuolapatrimonio.it/home/reserved/upload/listino.xls on line 57986
Il downolad avviene mediante queste righe di codice:
Se scarico il file tramite FTP tutto corretto.Codice PHP:
$filename = 'listino.xls';
header ("Content-Type: application/vnd.ms-excel");
header ("Content-Disposition: inline; filename=$filename");
include 'upload/listino.xls';
Può dipendere da un carattere non accettato all'interno del file? Se si come risolvere?