ASP上传组件-经典ASP [英] ASP Upload Component - Classic ASP

查看:86
本文介绍了ASP上传组件-经典ASP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将站点从专用服务器移到了GoDaddy共享托管帐户,并且遇到了很多问题!一个就是使用ASP Upload.

I have just moved a site from a dedicated server to a GoDaddy shared hosting account, and have just encountered loads of problems! One being with ASP Upload.

在Classic ASP中,通常是将文件上传到我的文件夹中的操作:

In Classic ASP, this is what I would normally do to upload files to my folder:

Set upload = Server.CreateObject("Persits.Upload")
uploadPath = Server.MapPath("../../files/photos/"&token_&"/")
upload.IgnoreNoPost = True
upload.Save(uploadPath)
Set upload = Nothing

但是自从转到GoDaddy以来,我得到了这个讨厌的消息:

But since moving to GoDaddy, I get this nasty message:

This feature has been disabled by the system administrator. Use SaveVirtual instead.

我继续阅读ASP Upload的网站文档,但找不到 SaveVirtual ,只有 SaveAsVirtual ,这是我一直无法解决的地方.

I went on to ASP Upload's website documentation and I could not find SaveVirtual, only SaveAsVirtual which is where I have become unstuck.

我尝试使用SaveAsVirtual,但抛出错误,指出我正在使用物理路径,而我应该使用虚拟路径!我真的不明白这一点,并希望有人能把我摆平.我的网站现在被认为已损坏并且已离线,请提供帮助.

I tried using SaveAsVirtual but it threw an error stating that I was using a physical path and I should be using a virtual path! I really don't understand this and was hoping that somebody could put me straight. My website is now deemed broken and is offline, please help.

这是我在物理/虚拟路径错误之前尝试过的方法:

This is what I tried before the physical/virtual path error:

Set upload = Server.CreateObject("Persits.Upload")
uploadPath = Server.MapPath("../../files/photos/"&token_&"/")
upload.IgnoreNoPost = True
upload.SaveAsVirtual(uploadPath)
Set upload = Nothing

推荐答案

根据文档,该方法名为 SaveVirtual .它为您执行 Server.MapPath 转换.

According to the docs, the method is named SaveVirtual. It does the Server.MapPath conversion for you.

因此,尝试:

Set upload = Server.CreateObject("Persits.Upload")
uploadPath = "../../files/photos/"&token_&"/"
upload.IgnoreNoPost = True
upload.SaveVirtual(uploadPath)
Set upload = Nothing 

这篇关于ASP上传组件-经典ASP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆