如何张贴数组键从.net/ c#到php


How to post array key from .net/C# to php

我需要将我的Dictionary<string,string>转换为php数组键,如下所示:

$result['iv'] = iv;
$result['json'] = pJSON;
$result['header'] = header;

然后我需要将其发布到使用php的目标服务器。

我该怎么做呢?

为什么不把它转换成更普遍认可的格式呢?

我建议使用c# JSON(见页面底部的c# JSON库列表),然后在PHP中你可以使用:

$result = json_decode($_POST['result'], true);