lulemurfan
New member
I have used this code on another website of mine but now i'm trying to use in on another its just not allowing me to upload.
Everything is chmod-ed to 0777
<form enctype="multipart/form-data" action="uploader.php"
method="post"><input name="MAX_FILE_SIZE"
value="100000" type="hidden">
Choose a file to upload: <input name="uploadedfile"
type="file"><br>
<input value="Upload File" type="submit"></form>
<?php $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";
header("refresh:1; url='index.php'");
} else{
echo "There was an error uploading the file, please try again!";
header("refresh:3; url='index.php'");
}
?>
Everything is chmod-ed to 0777
<form enctype="multipart/form-data" action="uploader.php"
method="post"><input name="MAX_FILE_SIZE"
value="100000" type="hidden">
Choose a file to upload: <input name="uploadedfile"
type="file"><br>
<input value="Upload File" type="submit"></form>
<?php $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";
header("refresh:1; url='index.php'");
} else{
echo "There was an error uploading the file, please try again!";
header("refresh:3; url='index.php'");
}
?>