File Upload
4 posts
Page 1 of 1
Index.php:
Code: Select all
Process.php
<form enctype="multipart/form-data" action="process.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
Code: Select all
Make shure uploads is CHMOD'd to 0777 or 777<?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";
} else{
echo "There was an error uploading the file, please try again!";
}
?>
Sick! is there anyway you can password is to only allow myself to upload files?
Ohh yeah recomended to not use that But you could put it in your cpanel?
well if you make a custom one or something xD
well if you make a custom one or something xD
Esky wrote:Sick! is there anyway you can password is to only allow myself to upload files?I control my uploads and navigation on all my sites by using SESSIONs. Then by using a SESSION, you can control many feature that you can write into your php script.
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023