View previous topic :: View next topic |
Author |
Message |
nodosur -
Joined: 12 Jan 2005 Posts: 8 Location: Argentina
|
Posted: Wed Mar 28, 2007 12:07 am Post subject: page for UPLOAD |
|
|
hello to all, do I need to mount in my webserver a page for upload, since it does? ... some example pleasssss.....
thanks
® _________________ Salu2 cordi@les a To2 y que alguien perdone nuestros PK2.
® |
|
Back to top |
 |
 |
Vahn -
Joined: 10 Aug 2005 Posts: 51 Location: At my computer
|
Posted: Wed Mar 28, 2007 9:23 pm Post subject: |
|
|
Thats Very Cryptic, Care to Elaborate for Me?
Do you require some one to help you with an Upload page? or just wondering if its possible? or something else??
-Vahn _________________ A ship in the harbor is safe, But thats not what Ships were Built for. ~ John Shedd
Success Comes before Work only in the Dictionary ~ Harvey Mackay
 |
|
Back to top |
 |
 |
hc2995 -
Joined: 07 Aug 2006 Posts: 644 Location: Maryland, USA
|
Posted: Wed Mar 28, 2007 11:13 pm Post subject: |
|
|
When you say upload what do you mean? You can upload using PHP, PERL, Javascript ETC..... but you will need the basic stuff:
1) A script language (PHP, PERL, ETC....)
2) An FTP server with user account(s) to be used for upload, as well as the right permissions _________________ Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P |
|
Back to top |
|
 |
nodosur -
Joined: 12 Jan 2005 Posts: 8 Location: Argentina
|
Posted: Thu Mar 29, 2007 1:47 am Post subject: uploading |
|
|
I need to have a page to do upload and if it is with user pass much better
it can be with javascript so that it is simpler without need to mount a compiler php or perl.... ?
thank you _________________ Salu2 cordi@les a To2 y que alguien perdone nuestros PK2.
® |
|
Back to top |
 |
 |
cmxflash -
Joined: 11 Dec 2004 Posts: 872
|
Posted: Thu Mar 29, 2007 7:03 am Post subject: |
|
|
You cannot upload to a web server without some sort of serverside scripting language such as PHP or Perl. Here's a simple upload-script I wrote a while ago.
Please notice that this script allows any file to be uploaded, meaning it could be a security risk if somebody uploads a PHP-script and executes it.
Code: | <HTML><HEAD><title>Upload</title></HEAD><body><?php
if (isset($_FILES['upload'])) {
if (move_uploaded_file($_FILES['upload']['tmp_name'], "./upload/".$_FILES['upload']['name'])) {
echo "OK: ".$_FILES['upload']['name'];
} else {
echo "FAILED";
}
} else { echo "Please select a file"; }
?><hr /><form enctype="multipart/form-data" action="upload.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo 1024*1024*4096 ?>" />
File: <input name="upload" type="file" size="1" /><br />
<input type="submit" value="Upload" onclick="this.value='Uploading...'" />
</form></body></HTML> |
|
|
Back to top |
|
 |
hc2995 -
Joined: 07 Aug 2006 Posts: 644 Location: Maryland, USA
|
Posted: Thu Mar 29, 2007 12:25 pm Post subject: |
|
|
cmxflash wrote: | You cannot upload to a web server without some sort of serverside scripting language such as PHP or Perl. Here's a simple upload-script I wrote a while ago.
Please notice that this script allows any file to be uploaded, meaning it could be a security risk if somebody uploads a PHP-script and executes it.
Code: | <HTML><HEAD><title>Upload</title></HEAD><body><?php
if (isset($_FILES['upload'])) {
if (move_uploaded_file($_FILES['upload']['tmp_name'], "./upload/".$_FILES['upload']['name'])) {
echo "OK: ".$_FILES['upload']['name'];
} else {
echo "FAILED";
}
} else { echo "Please select a file"; }
?><hr /><form enctype="multipart/form-data" action="upload.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo 1024*1024*4096 ?>" />
File: <input name="upload" type="file" size="1" /><br />
<input type="submit" value="Upload" onclick="this.value='Uploading...'" />
</form></body></HTML> |
|
Make sure you have php installed before you use this, for info on php visit:
www.php.net
http://www.aprelium.com/abyssws/php.html (For php on linux, mac, or any other OS)
http://www.aprelium.com/abyssws/php5win.html (for php on windows) _________________ Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P |
|
Back to top |
|
 |
nodosur -
Joined: 12 Jan 2005 Posts: 8 Location: Argentina
|
Posted: Mon Apr 02, 2007 7:48 pm Post subject: up up up...... |
|
|
thank you, already copy the code, I did my page upload.php, he asks me for the information to do the upload...
but? .... not where it is recorded _________________ Salu2 cordi@les a To2 y que alguien perdone nuestros PK2.
® |
|
Back to top |
 |
 |
|