I don't know how to fix this but the problem is that it won't upload to the server that I'm using to host the website it creates the folder just fine but won't move it. The coding for the moving is below.
This is the error I get
Warning: move_uploaded_file(./userdata/profile_pics/iOy1pQXTZsLw7VA/) [function.move-uploaded-file]: failed to open stream: Is a directory in /home/a4640336/public_html/account_settings.php on line 103
and as well as this error code
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpX1zVno' to './userdata/profile_pics/iOy1pQXTZsLw7VA/' in /home/a4640336/public_html/account_settings.php on line 103
move_uploaded_file(@$_FILES["profilepic"]["tmp_name"],"./userdata/profile_pics/$rand_dir_name/".$FILES["profilepic"]["name"]);
echo "Your profile pic has been updated!".@$_FILES ["profilepic"]["name"];
//$profile_pic_name = @$_FILES["profilepic"] ["name"];
//$profile_pic_query= mysql_query("UPDATE users SET profile_pic='$rand_dir_name/$profile_pic_name' WHERE username='$username'");
//header("location: account_settings.php");
Overall I have tried to change where it is located to have it leading directly from the source but it doesn't change. If anyone can help please help me!
PS the commented out parts were done to be able to see the error
No comments:
Post a Comment