开发者

"Default decoder could not decode result"

Here are the files -

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>
开发者_如何学JAVA

score.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);

?>

Information does sends successfully creating and doing the query above. But "result" event gives "Default decoder could not decode result" error.


what will say this code for you?

<mx:HTTPService id="scoreService" url="http://" method="POST" fault="mx.controls.Alert.show(event.fault.faultString)" result="mx.controls.Alert.show(event.result.toString())">
    <s:request xmlns="">
        <name>myName</name>
        <score>myScore</score>
    </s:request>
</mx:HTTPService>

did you see this and this, do you have some difference in client/server side?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜