使用 ASP 将文件从 Web 用户上传到服务器

发布于 2024-07-07 12:01:17 字数 296 浏览 12 评论 0原文

我试图找出如何使用 ASP 页面将文件从 Web 用户上传到服务器。 显示的页面有一个“文件”类型的输入标记,如下所示:

<input type="file" name="uploadfile">

以及一个将表单信息传递到另一个 .ASP 页面的提交按钮。 此页面必须采用从输入控件获取的路径,并使用它以某种方式将文件保存到服务器。

我一直在想必须有一个通用的方法来做到这一点,因为我在很多网站上看到了这种事情,但它是如何做到的呢? 是否有某种可以调用的服务器对象?

I am trying to find out how to upload a file from a web user to a server using an ASP page. The displayed page has an Input tag of type "File" like this:

<input type="file" name="uploadfile">

And a submit button that passes the Form info to another .ASP page. This page must take the path it gets from the Input control and use it to somehow save the file to the server.

I keep thinking there must be a common way to do this, since I see this kind of thing on a number of websites, but how is it done? Is there some sort of server object that can be called for it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

十年不长 2024-07-14 12:01:17

这个脚本将为您提供帮助。

另外,您可以在 google 上搜索“asp 上传文件” - 有大量结果。

This script will help you.

Also, you may google for "asp upload file" - there are tons of results.

冷月断魂刀 2024-07-14 12:01:17

如果您正在做任何严肃的上传或有一个商业产品,您确实需要在经典 asp 中使用 COM 组件。 查看 SA-FileUp。 从那时起,它就一直是事实上的标准。

If you are doing any serious uploading or have a commercial product you really need to use a COM component in classic asp. Check out SA-FileUp. It has been the defacto standard for this since like forever.

守护在此方 2024-07-14 12:01:17

如果您的托管服务不允许您安装组件,您可能还需要查看以下脚本:

http://chris.brimson-read.com.au/index.php?option=com_content&view=article&id=6&Itemid =7

我见过各种各样的上传脚本,它们的质量……各不相同。 我没有在所选答案中使用该脚本,但值得尝试一些不同的选项。

If your hosting service doesn't allow you to install components, you may also want to look at this script:

http://chris.brimson-read.com.au/index.php?option=com_content&view=article&id=6&Itemid=7

I've seen a wide variety of upload scripts floating around, and they ... vary ... in quality. I've not used the script in the selected answer, but its worth trying a few different options.

じ违心 2024-07-14 12:01:17

我可以推荐 SA-FileUp 和 Dundas Upload。 它们都很容易安装,并且有很好的实施教程。

I can recommend SA-FileUp and Dundas Upload. They both are easy to install and have good tutorials on how to implement.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文