[求助]文件上传问题
我这段代码实现的是把文件上传到“C:\homework”<%
uploader.File.SaveToDisk "C:\homework"
%>
但现在我想把它传到相对目录中,我是这样写的:
uploader.File.SaveToDisk "./homework"
不知道错在哪,望高手指点!
如果我改为这样就又出错了。
<%
Set Post = Server.CreateObject("ActiveFile.Post")
Post.Upload server.MapPath("./tempforupload")
' not into the database, just for creating the fileobject
filepath = Post.FormInputs("zipfile").file.name
num = Post.FormInputs("num").value
passwd = Post.FormInputs("passwd").value
id_num = Post.FormInputs("id_num").value
set Post = nothing
%>
出错原因如下:
错误类型:
Server 对象, ASP 0177 (0x800401F3)
无效的类别字符串
' not into the database, just for creating the fileobject
num = Post.FormInputs("num").value
passwd = Post.FormInputs("passwd").value
id_num = Post.FormInputs("id_num").value
set Post = nothing
%>