如何从php服务器下载文件到c#客户端 [英] How can download files from php server to c# client
本文介绍了如何从php服务器下载文件到c#客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello Experts,
我只想使用来自php服务器的http从服务器下载文件。
我的客户端在c#windows应用程序上。
WebClient wc = new WebClient();
wc.DownloadFile(http://#####.co.in/anonymous/ direc.php,direc.php);
但是我的执行文件夹中有一个空白文件
有什么建议吗?
Hello Experts,
I am just want to download file from the server using http from php server.
and my client is on c# windows application.
WebClient wc = new WebClient();
wc.DownloadFile("http://#####.co.in/anonymous/direc.php", "direc.php");
but i am getting a blank file in my execution folder
Any suggestion?
推荐答案
当然,这很容易。你可以使用不同的类,System.Net.FtpWebRequest
:
https://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest%28v=vs.110%29 .aspx [ ^ ]。
-SA
Sure, this is pretty easy thing. You can use different class,System.Net.FtpWebRequest
:
https://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest%28v=vs.110%29.aspx[^].
—SA
这篇关于如何从php服务器下载文件到c#客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文