hey!
I'm tryin to make file upload form and i have this strange problem. When i try to upload image file or zip everything is ok
(i do echo to userfile_name & userfile)
Sample.jpg
/tmp/phpWaif1t
but when i try to upload image, i get
error:
PALLAS.doc
none
Warning: Unable to open 'none' for reading: No such file or directory in /home/customers/demos/public_html/temp/l_kiitos.ph on line 4
Couldn't copy the file!
my form source:
<form method="post" action="l_thanks.php" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="10000">
<input type="file" name="userfile">
<input type="submit" name="Submit" value="save">
</form>
and l_thanks.php source:
<?
echo $userfile_name;
echo "<br>".$userfile;
copy("$userfile", "$userfile_name") or die("Couldn't copy the file!");
?>
I have tryied to make this work with .htacess file, but it didn't help
AddType application/octet-stream rtf
AddType application/octet-stream doc
AddType application/octet-stream xls
AddType application/octet-stream ppt
Can someone tell my problem is? If i tell the path where copy file same thing happens.