Home >Database >Mysql Tutorial >用JSP文件上载轻松实现_MySQL

用JSP文件上载轻松实现_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 14:08:36931browse

现在JSP被越来越多的人应用在后台程序的开发及动态网页的制作上了,今天就来介绍一下如何用JSP来实现文件的上载。

  一、RFC1867规范

  在过去的Html中,表单不能实现文件的上传,这多少限制了一些网页的功能。RFC1867规范(即Html中实现基于表单的文件上传)对表单作出了扩展,增加了一个表单元素&:ltinput type=file>。通过使用这个元素,浏览器会自动生成一个输入框和一个按钮,输入框可供用户填写本地的文件名和路径名,按钮可以让浏览器打开一个文件选择框供用户选择文件。具体的表单实现如下:

  <FORM ACTION=upload.jsp ENCTYPE=″multipart/form-data″ METHOD=POST>
  Please input your name

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn