我在Actionscript中的XMLList中有值。需要将这些值发送到数据库并进行更新。 我的ActionScript代码如下:从ActionScript发送xml到PHP
public static function saveUserPermList():void {
var ht:HTTPService = new HTTPService();
ht.url = Config.getServerURL();
ht.method = URLRequestMethod.POST;
//ht.resultFormat = "e4x";
ht.contentType = "text/xml";
ht.request["action"] = "saveUserPermListXML";
ht.request["pdata"] = Application.application.userPermListModel.toString();
ht.addEventListener(ResultEvent.RESULT,AdminUserList.saveUserPermListResult);
ht.send();
}
public static function saveUserPermListResult(e:ResultEvent):void {
trace(e);
}
- 我怎样才能XMLList中的数据发送到PHP?我应该向它添加一个toString()吗?
- 还应该在Flex中的contentType。
我如何能赶上这里面的PHP,PL让我知道,试图用,这样一来,
如果($用户 - > isAllowedAccess()){
header("Content-type:text/xml");
$postedData = $_POST["pdata"];
// $xmldoc = simplexml_load_string($POST['pdata']);
// echo($xmldoc);
}
没有运气。 Pl让我知道。
托默勒格嗨,没有得到你。发布源代码的屏幕截图以显示我正在尝试的内容。如果有更好的方法,请让我知道。 – 2010-05-25 11:18:38