What's wrong with this?
<form method="post" enctype="multipart/form-data" action="php/api/member_settings_profile_avatar.php">
<input type="file" name="settings_choose_avatar" id="settings_choose_avatar">
<input type="submit" value="Upload" />
</form>
php/api/member_settings_profile_avatar.php, line 2:
move_uploaded_file($_FILES["settings_choose_avatar"]["tmp_name"], "img/test.png");
I get the following error upon submitting a valid .png file:
Warning: move_uploaded_file(img/test.png): failed to open stream: No such
file or directory in /customers/4/1/a/mysitenamehere.com/httpd.www/php/api
/member_settings_profile_avatar.php on line 2 Warning: move_uploaded_file():
Unable to move '/customers/4/1/a/mysitenamehere.com/tmp/phpeN9wyk' to
'img/test.png' in /customers/4/1/a/mysitenamehere.com/httpd.www/php/api
/member_settings_profile_avatar.php on line 2
Is it an issue with my host or what?
is_writableon the folder?/php/api/imgfolder or did you perhaps mean/img(all relative to the web-root)?