Hi all:
I have a script that uploads an image to a dir on my web-server:
But I get this error message:
Warning: Unable to create '/path/to/htdocs/sport/images/news/': Is a directory in /path/to/htdocs/sport/admin/step4.php on line 109
Bodged file upload on update!
Weird thing is, the uploaded image is right there in that directory!
So why am I getting this error message?
My upload script, 'step4.php' :
$destination="/path/to/htdocs/sport/images/news/";
copy($newsstoryimage,$destination . $newsstoryimage_name);
if(!copy($newsstoryimage,$destination)) { //Start of 'if' clause is line 109
echo "Bodged file upload on update!";
exit;
}
else {
echo "File was sucessfully uploaded!";
}
Any pointers would be greatly appreciated as would any security issues you guys may be aware of when dealing with image/file uploads from the web.
Cheers and thanks.
Russ