日期:2014-05-17  浏览次数:21099 次

高分求救上传图片后文件路径获取不到,问题解决,马上给分,谢!
问题是这样的:
我在表单中有这样一个图片上传控件:
<form   action= "save.asp?abc=add_yes&id= <%=   request( "id ")   %> "   method= "post "   name= "form "   id= "form "   onsubmit= "javascript:return   checksignup1(); ">
                           
<tr>  
<td   align= "right "   class= "font-14 "> 图片上传: </td>
<td>   <script   language   =   "JavaScript ">
function   loadForm()
{
      UploadFile_b.txtfile_b.value   =   document.form.photo.value;
      UploadFile_b.txtfile_b.value   =   document.form.hiddenphoto.value;
      document.form.hiddenphoto.value   =   UploadFile_b.txtfile_b.value;
      return   true
}
</script>  
<input   type= "hidden "   name= "hiddenphoto "   value= " "   onChange= "loadForm() ">
<textarea   name= "photo "   style= "display:none "   onChange= "loadForm "> </textarea>
<iframe   style= "top:2px "   ID= "UploadFile_b "   src= "upload_b.asp "   frameborder=0   scrolling=no   width= "350 "   height= "25 "> </iframe>  
</td>
</tr>

<input   name= "Submit "   type= "submit "   class= "font-a14 "   value= "提交修改 ">

</form>

upload_b.asp文件如下:(可以原封不动复制)
<!--#include   file= "../../mycartconn/conn.asp "-->
<SCRIPT   language=javascript>
function   check_file()  
{
    var   strFileName=upform.txtfile_b.value;
    if   (strFileName== " ")
    {
        alert( "请选择要上传的文件 ");
        return   false;
    }
}
</SCRIPT>
<%
Const   EnableUploadFile= "Yes "                 '是否开放文件上传
Const   MaxFileSize=100             '上传文件大小限制
Const   SaveUpFilesPath= "../tp/biz "                 '存放上传文件的目录
Const   UpFileType= "gif|jpg|bmp|png "                 '允许的上传文件类型

huiyuan=Request.Cookies(my_url)( "huiyuan ")
sql6= "select   id,vip   from   huiyuan   where   huiyuan= ' "&huiyuan& " ' "
set   rs6=server.createobject( "adodb.recordset ")
rs6.open   sql6,conn,3,1
if   rs6( "vip ")=1   then   biz=1
rs6.close
set   rs6=nothing

if   EnableUploadFile= "Yes "   then%>
<body   leftmargin= "0 "   topmargin= "0 ">
<form   action= "upfile_b.asp "   method= "post "   name= "upform "     onSubmit= "return   check_file() "   enctype= "multipart/form-data ">
<input   name= "txtfile_b &quo