怎么样取相对路径 请问 怎么样取相对与虚拟目录下文件夹 UP的相对路径 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ...server.mappath("up"),不就可以了么,这个是指向虚拟目录的根路径 给你这个程序,你看看。发送页面:<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 nextresponse.write "您的文件名称为"response.write mid(filepath,ubound(maxnum,1)+1,filepathlen-ubound(maxnum,1))%> 当 IDENTITY_INSERT 设置为 OFF 时,不能为表 'Customer' 中的标识列插入显式值。 Session 问题 大家看下 顺便说说两句 求一js弹出层。 从没见的.net错误~!求助啊。 求助:如何在网页中直接执行一个可执行文件? 关于信息系统的权限控制? ********碰到问题啦,请教各位大侠!************* asp:TreeView 选中子节点取值bug Byte[] Copy 我要安装ASP。NET应如何安装,请详细写下 有关DataGrid的问题,急救! 一个搞不明白的问题???
发送页面:
<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))
%>