?
Solved

Upload file to site

Posted on 2003-03-04
8
Medium Priority
?
286 Views
Last Modified: 2012-05-04
hello,

I need some basic html file , that will help me to upload file to my web site.

Can any one send me such a file ?

thank u
Asi
0
Comment
Question by:asi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 

Expert Comment

by:ospire
ID: 8066851
Please Explain your problem clearly.so that i can try to help you
0
 

Expert Comment

by:ospire
ID: 8066858
Please Explain your problem clearly.so that i can try to help you
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 8068342
Asi -

Are you asking how to upload your HTML files to the web site?  

Or are you asking how to create a form that will allow you to upload a file?
0
7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

 

Author Comment

by:asi
ID: 8070308
how to create a form that will allow you to upload a file?
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 8070880
Asi - while HTML can be used to define the form, you will need a CGI, ASP, or PHP script to actually upload the file.

You'll have something like:

<form action="/cgi-bin/upload.pl">
<INPUT TYPE="file" NAME="File1">
<input type=submit>


Your CGI script (called upload.pl in the above example) will look something like:

#!/usr/bin/perl
use CGI qw(:standard);
my $handle=my $filename=param('File1');

$ImageDir = '/full/path/to/where/to/put/the/file";

$filename=~s/^[a-zA-Z]://;
$filename=~m{^.*[/\\](.*?)$};
$filename=$1;

open (OUTFILE,">>$ImageDir/$filename");
while ($bytesread=read($handle,$buffer,1024)) {
   print OUTFILE $buffer;
}
close(OUTFILE);
   
print redirect($ENV{HTTP_REFERER});  
0
 
LVL 3

Expert Comment

by:jayrod
ID: 8152128
Here is a php example:


print "\n<form ENCTYPE=\"multipart/form-data\"  action=\"" . $PHP_SELF . "\" method=\"post\">";
  print "\n<INPUT TYPE=\"hidden\" name=\"task\" value=\"upload\">";
  print "\n<P>Upload a file";
  print "\n<br><INPUT NAME=\"the_file\" TYPE=\"file\" SIZE=\"35\"><br>";
  print "\n<input type=\"submit\" Value=\"Upload\">";
  print "\n</form>";

0
 

Expert Comment

by:da_munches
ID: 8173854
If you prefer ASP, try Aspemail at:

  http://www.aspemail.com/

You can upload and download with it.
0
 
LVL 1

Accepted Solution

by:
wizzkidd earned 100 total points
ID: 8206193
(Free) PHP Upload Script: http://www.hotscripts.com/Detailed/6470.html

(Free) Pure ASP Upload Script (no compoment needed):
http://www.asp101.com/articles/jacob/scriptupload.asp

(Free) CGI Upload Script:
http://www.tneoh.zoneit.com/cgi/upload/

All the upload forms would follow the following principle:

<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="proccessupload.XXX">
<INPUT TYPE="FILE" NAME="FILE1"><BR>
<INPUT TYPE="SUBMIT" VALUE="Upload">
</FORM>

processupload.XXX is the PHP/ASP/CGI file that does the actual uploading to the server.

-WizzKidd
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question