简体   繁体   English

上传表单可以将文件上传到另一台服务器吗?

[英]Can a upload form upload files to another server?

Is it possible to have a HTML form on server A and have it upload content to server B? 是否可以在服务器A上安装HTML表单并将其上传到服务器B?

Can this be achieved? 这可以实现吗? I am trying to use an iframe with the form starting on the other server, but I need information passed to the form from server A. Would I have to use javascript? 我试图使用iframe与另一台服务器上的表单开始,但我需要从服务器A传递给表单的信息。我是否必须使用javascript?

Thank you for your help! 谢谢您的帮助!

As long as you're sending it via POST and your remote server is accepting that POST response, sure. 只要您通过POST发送它并且您的远程服务器正在接受该POST响应,当然。 No need for javascript, just set the form action to the remote server. 不需要javascript,只需将表单操作设置为远程服务器即可。

You can but the server b has to accept the upload. 您可以,但服务器b必须接受上传。 It has to be done on the server side. 它必须在服务器端完成。 Using php or equivalent. 使用php或同等的。

Here is a great tutorial 这是一个很棒的教程

http://www.tizag.com/phpT/fileupload.php http://www.tizag.com/phpT/fileupload.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM