I am using copy and move_uploaded_file() copy(/tmp/phpJ0lg4r.jpeg) [function.copy]: it gives me the error failed to open stream: No such file or directory in
I do not think there is an error in the code, but its the image temp path somewhere the error.
Any ideas to why?
–EDIT–
- The file permission is :777
- Using only move_uploaded_file
—CODE–
<form method="post" enctype="multipart/form-data" action="">
<INPUT NAME="u" TYPE="file" size="90">
<input type="submit" value="submit">
</form>
move_uploaded_file($HTTP_POST_FILES['u'.$i]['name'],"Path_Of_Directory");
Though there are several checks of the type of file, this is the basic. It just does not copy or move the file.
Try
move_uploaded_file($_FILES["u"]["tmp_name"], "Path_Of_Directory");