这是文件-
MXML:
<mx:HTTPService id="score" url="http://...score.php" fault="mx.controls.Alert.show(event.fault.faultString)"
method="POST" result=""mx.controls.Alert.show(event.result.toString())">
<s:request xmlns="">
<name>{name}</name>
<score>{score}</score>
</s:request>
</mx:HTTPService>
分数.php
<?php
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
$connections = mysql_connect("...");
mysql_select_db("...");
$name = $_POST['name'];
$score = $_POST['score'];
$query = "INSERT INTO hs (name, score) VALUES ('$name', '$score')";
mysql_query($query);
?>
信息确实发送成功创建并执行上述查询。但“结果”事件给出“默认解码器无法解码结果”错误。