02-22-2012, 04:07 PM
Okay I'm trying to use this php upload script. But I keep getting this error. "Sorry, there was a problem uploading your file."
here is my code
upload.html
upload.php
PLEASE HELP ME!
here is my code
upload.html
Code:
<form enctype="multipart/form-data" action="upload.php" method="POST">
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" />
</form>
upload.php
Code:
<?php
$target = "home/users/web/b60/moo.tdrunner95com/ideviceforums.net/packages_upload/";
$target = $target . basename( $_files['uploaded']['name']) ;
$ok=1;
//Here we check that $ok was not set to 0 by an error
if ($ok==0)
{
Echo "Sorry your file was not uploaded";
}
//If everything is ok we try to upload it
else
{
if(move_uploaded_file($_files['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_files['uploadedfile']['name']). " has been uploaded";
}
else
{
echo "Sorry, there was a problem uploading your file.";
}
}
?>
PLEASE HELP ME!