永发信息网

ASP 爱好者进。。。。。急啊。。。

答案:1  悬赏:0  手机版
解决时间 2021-07-19 08:41
  • 提问者网友:自食苦果
  • 2021-07-19 00:29
<body>
<%
yuanwjj=request.Form("ywjj")
yuanwjm=replace(request.form("ywjm"),".","")
yuanhzm=request.form("yhzm")
muwjj=request.form("mwjj")
muwjm=replace(request.form("mwjm"),".","")
muhzm=request.form("mhzm")
folder1=server.MapPath(yuanwjj)
folder2=server.MapPath(muwjj)
set myFso=server.CreateObject("Scripting.FileSystemObject")
if myFso.fileExists(folder1&"\"&yuanwjm&"."&yuanhzm) then
'myFso.copyfile server.MapPath(yuanwjj)&"\"&yuanwjm&"."&yuanhzm ,server.MapPath(muwjj)&"\",true
myFso.copyfile folder1&"\"&yuanwjm&"."&yuanhzm ,folder2&"\",true
else
response.write("源文件不存在")
end if
set myFso=nothing
%>
<form action="" method="post" name="form1" id="form1">
<p>&nbsp; </p>请选择你要拷贝的源文件:
<label>
<select name="ywjj" id="ywjj">
<option>a1</option>
<option>newFile</option>
</select>
</label>
\
<label>
<input name="ywjm" type="text" id="ywjm" size="10" />
</label>
.
<label>
<input name="yhzm" type="text" id="yhzm" size="6" />
</label>
<p> &nbsp;请选择要拷贝的目标文件:
<label>
<select name="mwjj" id="mwjj">
<option>a1</option>
<option>newFile</option>
</select>
</label>
\
<label>
<input name="mwjm" type="text" id="mwjm" size="10" />
</label>
.
<label>
<input name="mhzm" type="text" id="mhzm" size="6" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit2" value="提交" onclick=""/>
</label>
</p>
</form>
</body>
最佳答案
  • 五星知识达人网友:一秋
  • 2021-07-19 01:59

文件夹没有值啊?


我改了,你试试看


<body>
<%
yuanwjj=request.Form("ywjj")
yuanwjm=replace(request.form("ywjm"),".","")
yuanhzm=request.form("yhzm")
muwjj=request.form("mwjj")
muwjm=replace(request.form("mwjm"),".","")
muhzm=request.form("mhzm")
folder1=server.MapPath(yuanwjj)
folder2=server.MapPath(muwjj)
set myFso=server.CreateObject("Scripting.FileSystemObject")
if myFso.fileExists(folder1&"\"&yuanwjm&"."&yuanhzm) then
'myFso.copyfile server.MapPath(yuanwjj)&"\"&yuanwjm&"."&yuanhzm ,server.MapPath(muwjj)&"\",true
myFso.copyfile folder1&"\"&yuanwjm&"."&yuanhzm ,folder2&"\",true
else
response.write("源文件不存在")
end if
set myFso=nothing
%>
<form action="" method="post" name="form1" id="form1">
<p>&nbsp; </p>请选择你要拷贝的源文件:
<label>
<select name="ywjj" id="ywjj">
<option value="a1">a1</option>
<option value="newFile">newFile</option>
</select>
</label>
\
<label>
<input name="ywjm" type="text" id="ywjm" size="10" />
</label>
.
<label>
<input name="yhzm" type="text" id="yhzm" size="6" />
</label>
<p> &nbsp;请选择要拷贝的目标文件:
<label>
<select name="mwjj" id="mwjj">
<option value="a1">a1</option>
<option value="newFile">newFile</option>
</select>
</label>
\
<label>
<input name="mwjm" type="text" id="mwjm" size="10" />
</label>
.
<label>
<input name="mhzm" type="text" id="mhzm" size="6" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit2" value="提交" onclick=""/>
</label>
</p>
</form>
</body>


我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯