Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.NET桌面应用程序将文件发送HTTP到PHP网页的最佳方式是什么?
.NET
HTTP
PHP
该.NET应用程序可以使用此代码上传文件:
using(WebClient client = new WebClient()) { client.UploadFile(address, filePath); }
只需在PHP页面中添加这个就可以上传文件吗?
file_put_contents(filename, file_get_contents('php://input'));
这是PHP对我有用的代码,而不是问题中的代码:
move_uploaded_file($_FILES["file"]["tmp_name"], $_FILES["file"]["name"]);