I'm trying to get the copy($file, $filepath) function working but am having some problems.
1.) I have a form with ENCTYPE="multipart/form-data" and within it a file field with name="file". This form calls add_file_db.php
2.) add_file_db.php cannot upload the file because it says the directory does not exist. After trying all sorts of things and directories I was certain that the file path was correct and it was giving a valid destination for the file.
3.) I thought maybe it was a problem with the file itself. When you upload and go echo $file doesn't it output something wierd like php-324 or something like that? And you have to use $file_name to get the real name (C:/files/file_to_upload.file for example) as well as $file_size, $file_type for other stats.
This code here:
echo "File: $file<br>File_name: $file_name<br>File_size: $file_size<br>File_type: $file_type<br>";
outputs this:
File: C:\WINDOWS\Desktop\projects\deercrest\site\design_guidelines.doc
File_name:
File_size:
File_type:
Does anyone have any idea why it is not uploading as a file, and instead like a text variable? Remember I am using the correct ENCTYPE.
Thanks - I will GREATLY appreciate ANY feedback I can get on this,
Ben