1.是以post方式提交的的吗
2.有无 :enctype= "multipart/form-data "
表单上传如果不加enctype= "multipart/form-data ",上传文件时使用默前游认编码application/x-www-form-urlencoded,不能用于文件上传,而添加后设置编码为MIME编码才能完整纯悔历上传。还有就是天加了enctype= "multipart/form-data "不能使用request.getParameter("fileName")来获取表单元做搜素
<form action="" method="post"><input type="file" name="file1"/态胡孙>
</form>
request.getParameter("file1"帆链)
<form action="做型" method="post" enctype="multipart/form-data">
<input type="file" name="file1"/>
</form>
ServletInputStream sis = request.getInputStream()
用sis读取,一行一行分析.
<form action="" method="post"><input type="file" name="file1"/态胡孙>
</form>
request.getParameter("file1"帆链)
<form action="做型" method="post" enctype="multipart/form-data">
<input type="file" name="file1"/>
</form>
ServletInputStream sis = request.getInputStream()
用sis读取,一行一行分析.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)