我正在尝试使用 php 文件获取组合框的下拉列表。该 php 文件返回一个 xml 字符串,该字符串已用作组合框的数据提供者。
我也关注了这个帖子,但徒劳无功。
详细信息
我已将 mx:Application 的 creationComplete 属性设置为 init()。在 init() 函数中,我发送了以下 HTTPService
<mx:HTTPService id="interfaces" url="interfaces.php" resultFormat="e4x" method="POST">
</mx:HTTPService>
组合框:
更新: xml 应该看起来像
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<ifaces>
<iface>
<option>eth0</option>
</iface>
<iface>
<option>eth1</option>
</iface>
</ifaces>
但是如果我在浏览器中执行interfaces.php,唯一得到显示的是eth0eth1,而我正在回显包含整个xml数据的字符串。不应该显示整个 xml 类型的字符串吗?:(