This is your folder structure:
www/
index.html
img/
admin/
index.php
Your folder structure must be like this:
www/
index.html
img/
product/
admin/
index.php
your product
folder doesn't exist that's why you get an error like "failed to open stream: No such file or directory"
or set your code like this if you don't want another directory inside the img
folder:
move_uploaded_file(../img/image.jpg);