sawtons
01-25-2008, 01:24 AM
Hi, I have had a look at the other posts on this topic, but I can't seem to get this action to work for me...
This is the error I get:
Warning: move_uploaded_file(uploads/upload.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/nameofsite/public_html/forms/valuations.php on line 122
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpSkRat9' to 'uploads/upload.jpg' in /home/nameofsite/public_html/forms/valuations.php on line 122
Line 122 reads as:
Line 119 - If (is_uploaded_file($_FILES['some_file']['tmp_name'])) {
Line 120 - $target_path = "uploads/";
Line 121 - $target_path = $target_path . basename( $_FILES['some_file']['name']);
Line 122 - if(move_uploaded_file($_FILES['some_file']['tmp_name'], $target_path)) {
Line 123 - $attachment = true;
Line 124 - } else{
Line 125 - $error .= "There was an error uploading the file, please try again!";
I would really appreciate some help on this. Its driving me crazy!!
This is the error I get:
Warning: move_uploaded_file(uploads/upload.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/nameofsite/public_html/forms/valuations.php on line 122
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpSkRat9' to 'uploads/upload.jpg' in /home/nameofsite/public_html/forms/valuations.php on line 122
Line 122 reads as:
Line 119 - If (is_uploaded_file($_FILES['some_file']['tmp_name'])) {
Line 120 - $target_path = "uploads/";
Line 121 - $target_path = $target_path . basename( $_FILES['some_file']['name']);
Line 122 - if(move_uploaded_file($_FILES['some_file']['tmp_name'], $target_path)) {
Line 123 - $attachment = true;
Line 124 - } else{
Line 125 - $error .= "There was an error uploading the file, please try again!";
I would really appreciate some help on this. Its driving me crazy!!