Hello all,
i am having a strange problem with file uploads but cannot figure out why it is not working. basically, the problem occurs when uploading word documents. the files are getting moved to the correct location on the server but the size of the file is much smaller and when i try and open it it is not a complete file. so i assume that the whole file isn't getting transfered (original file = 30k, uploaded file = 637bytes). but this doesn't happen with text or html files. they are transfered nicely and can then be viewed from the server within a web browser.
so, my question is.....does anyone know why the whole file wouldn't be copied when uploading word documents and if so how to rectify it?
here is the code for the upload (but i know this works as it works for text and html files:
<?php
$filedir = "/websites/1102/woodwo8d/public_html/files";
$userfile_name = $_FILES['userfile']['name'];
$location = "$filedir/$userfile_name";
move_uploaded_file($userfile_tmp, $location);
?>
i cannot fathom this out and would appreciate any help! i cannot understand how some file types work and then the word documents don't!
thanks,
tom.