er i tried uploading but it keeps giving me this error
"Warning: move_uploaded_file(http://localhost/webby/UploadImage(82).jpg) [function.move-uploaded-file]: failed to open stream: HTTP wrapper does not support writeable connections. in c:\Inetpub\wwwroot\webby\uploader.php on line 7
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\TEMP\php5B.tmp' to 'http://localhost/webby/UploadImage(82).jpg' in c:\Inetpub\wwwroot\webby\uploader.php on line 7
There was an error uploading the file, please try again!Array ( [uploadedfile] => Array ( [name] => Image(82).jpg [type] => image/jpeg [tmp_name] => C:\WINDOWS\TEMP\php5B.tmp [error] => 0 [size] => 89020 ) )"
here is my coding:
order.php
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<input name="uploadedfile" type="file">
<input name="btnUpload" type="submit" id="btnUpload" value="Upload">
uploader.php
$target_path = 'C:\Inetpub\wwwroot\Webby\Upload';
$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!";
print_r($_FILES); //debugging info
}