简体   繁体   English

跨域上传,从一个域到另一个域上载文件

[英]Cross domain uploading , upload files from one domain on another domain

how to allow one domain to access another domain for uploading files from domain1 on domain2? 如何允许一个域访问另一个域以从domain2上的domain1上传文件? I have a page on domain1 from where users upload images but I want that the images get uploaded on a folder on domain2.com like domain2.com/uploads. 我在domain1上有一个页面,用户可以从该页面上载图像,但我希望图像可以上载到domain2.com上的文件夹中,例如domain2.com/uploads。

How do to allow domain1 to access domain2? 如何允许domain1访问domain2?

http://domain-A.org/send.php : http://domain-A.org/send.php

<form action="http://domain-B.org/upload.php" method="post" enctype="multipart/form-data">
  <!-- .. -->
</form>

http://domain-B.org/upload.php : http://domain-B.org/upload.php

<?php
print_r($_FILES);

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

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