I keep getting an error with the script that I wrote to upload files to the server. I am using the copy function, but perhaps I am using it improperly.
if (copy ($File, $exact_directory)){
$File is the variable given by the form and $exact_directory is the directory path from root on the server to where the image should be stored. $exact_directory also includes the filename that I want the $File to be saved as. Is there any reason why this error comes up?
Warning: Unable to open '' for reading: No such file or directory in upload_image.php on line 21
I have even echoed the $exact_directory variable to the screen just before calling this function and it is precisely what it shoud be. Perhaps I am using the function incorrectly. Any suggestions?