HTML中的图片上传无法正常工作

时间:2013-10-28 05:01:18

标签: html post upload

这里是我用来将图像上传到服务器的代码。但它返回“在此服务器上找不到请求的URL /”。错误。

<form name="uploadFile" action="http://http.brammies.com" method="post" enctype="multipart/form-data" onSubmit="return validate();">
<input type="hidden" name="choice" value="upload">
<table align="center">
<tr>
<td><span style="color:red;font-weight:bold">Upload files</span></td><td><input type="file" id="ufile" name="ufile" onKeyPress="return false;" style="BACKGROUND-color:Thistle">(* jpg,gif,png)</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="submit" value="Upload" style="BACKGROUND-color:Thistle"></td>
</tr>
</table>
</form>

任何人都可以告诉我我的代码有什么问题吗?

1 个答案:

答案 0 :(得分:1)

网址http://http.brammies.com未引用表单处理程序。从外部来看,无法确定<{1}}属性值应该的内容。

根据服务器在直接访问http://http.brammies.com时给出的响应,似乎属性值应为http://http.brammies.com/cgi-bin/,后跟CGI脚本的某个文件名。