【发布时间】:2016-11-05 23:48:20
【问题描述】:
C#:
using (WebClient client = new WebClient()) {
byte[] response = client.UploadValues("http://example.com/api/server/key",
new NameValueCollection() {
{ "key", key }
});
string result = Encoding.UTF8.GetString(response);
Console.WriteLine(result);
}
PHP:
$key = $_POST["key"];
echo($key);
当它运行时,PHP $_POST 数组永远不会有任何实际发布到它的值。表示回显行没有输出。
另外,是的,'key' 确实有一个值,在这个例子中它只是被裁剪掉了。
【问题讨论】: