如何在c#中从php脚本获取echo输出? [英] How to get echo output from php script in c#?
本文介绍了如何在c#中从php脚本获取echo输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我向我的测试php脚本发送请求,该脚本回显"Hello World"。如何使用c#接收echo输出并将其显示在label1中?
I send request to my test php script which echoing "Hello World". How do I receive the echo output with c# and display it in label1?
推荐答案
也许是这样:
var wc = new WebClient();
   string result = wc.DownloadString("PHP脚本的地址......");
label1.Text = result;
这篇关于如何在c#中从php脚本获取echo输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文