I´m having some problems with .xls files after uploading it to a apache server with php. After upload it the file seems to be corrupted and it can't be open by excel or google sheets.
This is the php code i'm using to upload the file:
<?php
if ($_FILES['products']['size'] != 0) {
move_uploaded_file($_FILES['products']['tmp_name'],
'./product_files/' . $_FILES['products']['name']);
}
?>
The uploaded file is the same size than the original (i'm working with small files, that's not the problem) and it can be even read by PHP Excel.
Thanks in advance and sorry about my english.
IT'S SOLVED! I've found the problem, it wasn't the code but the transfer option of my ftp client (it was setted as text and it started to work when i changed to binary). Thanks!