请问 怎么样取相对与虚拟目录下文件夹 UP的相对路径

解决方案 »

  1.   

    ...server.mappath("up"),不就可以了么,这个是指向虚拟目录的根路径
      

  2.   

    给你这个程序,你看看。
    发送页面:
    <html>
    <head>
    <title>发送页面</title>
    <script language=javascript>
    function checkfile(theform)
    {
        if(theform.filepath.value=="")
        {
        alert("请点击浏览按钮,选择您要上传的文件!")
        theform.filepath.focus;
        return (false);
        }
     }
    </script>
    </head>
    <body>
     <form action=接收页面 method=post onsubmit="return checkfile(this)">
      <input type=file name=filepath>
      <input type=submit name=submit value=上传>
      <input type=reset name=reset value=清除>
     </form>
    </body>
    </html>接收页面
    <%
    '获得上传文件名
    dim maxnum()
    dim filepath
        filepath=request("filepath")
    dim filepathlen
        filepathlen=cstr(len(filepath))
        for i=1 to filepathlen
            if mid(filepath,i,1)="\" then
               redim maxnum(i) 
    end if
        next
    response.write "您的文件名称为"
    response.write mid(filepath,ubound(maxnum,1)+1,filepathlen-ubound(maxnum,1))
    %>