2012-10-09 151 views

回答

1
var client = new System.Net.WebClient(); 
client.UploadFile(address, filename); 

請參閱MSDN上的UploadFile

+0

謝謝,但怎麼稱爲後場? – siwymilek

0

嗯,我想嘗試可能的工作先從簡單的方式就是 - WebClient.UploadFile

WebClient client = new WebClient(); 
client.UploadFile(url, file); 

當然,你必須編寫相應的PHP代碼來處理上傳...

0

另一種方法是通過瀏覽器上傳文件並使用Fiddler處理上傳請求/響應。之後,您可以使用HttpWebRequest通過C#編寫確切的請求。