When I upload a file in PHP I am getting the wrong type for xlsx files.
It is telling me the type is a file name
Array (
[name] => report.xlsx
[type] => /folder/files/report/april_2013.xlsx
[tmp_name] => E:\path\to\temp\folder\phpCD1B.tmp
[error] => 0
[size] => 12433
)
Any ideas?
Hi
The code I am using is
view/display file
<form enctype="multipart/form-data" method="POST" action="update_comp.php" name="myform2">
<label>Upload Files ( PDF,CSV or EXCEL only ) </label>
<input type="file" name="file">
</form>
File update_comp.php
include ("filesFunctions.php");
if(isset($_FILES["file"])){
$file = $_FILES["file"];
print_r($file);exit;
$upload = new filesFunctions();
$id = $upload->uploadFiles($file,'dairy');
}
the print_r() statement prints
Array (
[name] => report.xlsx
[type] => /folder/files/report/april_2013.xlsx
[tmp_name] => E:\folder\to\temp\php5ACD.tmp
[error] => 0
[size] => 12433
)
Please note this only happens to xlsx files all other files work fine