|
-
Oct 30th, 2009, 06:59 PM
#1
Thread Starter
New Member
PHP Uploader
hey
i wanted to create form to upload files to my websites ftp.
But i dont know much about php, dunno if i should use php or html either.
Anyone got tips to give me?
i wanted this function for my website, its running php nuke 8.1
Thanks.
*EDIT*
i found this when searching around
PHP Code:
<?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!";
}
?>
but it seems to fail and comes with this messages
Warning: move_uploaded_file(uploads/Lekser.txt) [function.move-uploaded-file]: failed to open stream: No such file or directory in /users/silverlight76/www/uploader/uploader.php on line 6
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/users/silverlight76/temp/phpE3NZPe' to 'uploads/Lekser.txt' in /users/silverlight76/www/uploader/uploader.php on line 6
There was an error uploading the file, please try again!
the ftp supports uploading, got an ftp uploader made in vb, can it be fixed or can i drop that move_uploaded_file thingy?
Last edited by silver767; Oct 31st, 2009 at 09:05 AM.
Reason: changing title
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|