Replacement scheme for file upload components and other components

Source: Internet
Author: User
Tags file upload servervariables split
Upload File Upload:
You use the HTML file below to see
------upload.htm------
<HTML>
<BODY>
<form method= "Post" enctype= "Multipart/form-data" action= "upload.asp" >
File: <input type= "file" name= "Txtfilename" >
<input type= "Submit" value= "Upload" >
<FORM>
</BODY>
</HTML>
------upload.asp------------
<%
With response
. Write "<table border=1>"
For each Key in Request.ServerVariables
. Write "<tr><td>"
. Write Key
. Write "</td><td>"
. Write Request.ServerVariables (Key)
. Write "</td></tr>"
Next
. Write "</table>"
%>

Then you try different sizes of files and you'll find that uploading larger files takes more time,
Indicates that the file has been uploaded and the server side has not done any processing. Observe upload.asp
Display the results, the distribution http_content_length are not the same.

In fact, the file data you are uploading has been uploaded to the server via the HTTP protocol,
The data is in the request collection, as for where? What format? Download file:
Http://www.pstruh.cz/dlldownload/ScptUtl.exe, after installation, in the directory
ASP program samples, detailed description of how to split the document data, how to save in a few
According to the specific process of the library.
In this forum the Essence area also has the related introduction.
Because the ASP can only save text files and cannot save binaries, in fact
Http://www.pstruh.cz/dlldownload/ScptUtl.exe when the installation is in the calculation
The server component is installed on the machine so that the ASP can invoke the component to save the binary file.
This allows you to upload various types of files.
Similarly, the Chinaasp file Upload component is comprised of all the above processes,
Install chinaasp file Upload component, ASP can directly read the uploaded file data
and do appropriate processing, such as saving and so on, making ASP programming easier.
The uploaded file data is in Request.BinaryRead (Length), the key is
How to decompose it and save it.
Through the analysis of Http://www.pstruh.cz/dlldownload/ScptUtl.exe
Surface of the sample, understand its segmentation method, without server components and how to save it?

With WebClass all can be done. Know how to split strings in VB and
How do I save a binary file?

The last time I used the chinaasp file upload component expired, I'm going to use WebClass
Do the file upload.

Similarly, WebClass can develop features that many ASPs cannot do, such as
not only shows a picture, but it can also
Record the IP of the browser, so that you go to chat room to check other people's IP more convenient Ah! Oh
If you are familiar with the image format, Jpg,gif,bmp can also be based on the relevant data through the program automatically
Draw a graph, anyway, VB can do all can do.

WebClass, isn't it nice? It's just a simple program that's done directly with ASP.
Yes, it's complicated to do with WebClass. It seems that WebClass is much faster than ASP.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.