hi…i try to upload file…but got error…here i submit my coding…
#uploadForm1
[php]
# of Files to Upload
Choose a file to upload:
[/php]
#uploader
[php]
Untitled Document
<?php
// Where the file is going to be placed
$target_path = "uploads/";
/* Add the original filename to our target path. Result is "uploads/filename.extension" */
$target_path = $target_path;
/* Add the original filename to our target path. Result is "uploads/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
$_FILES['uploadedfile']['tmp_name'];
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path))
{ echo "The file ". basename( $_FILES['uploadedfile']['name'])." has been uploaded";
} else
{ echo "There was an error uploading the file, please try again!";
}
?>
[/php]
the error i got is
Warning: move_uploaded_file(uploads/printer.txt): failed to open stream: No such file or directory in c:program fileseasyphp1-7wwwsmttuploader.php on line 16
Warning: move_uploaded_file(): Unable to move ‘C:Program FilesEasyPHP1-7tmpphp7B.tmp’ to ‘uploads/printer.txt’ in c:program fileseasyphp1-7wwwsmttuploader.php on line 16
There was an error uploading the file, please try again!