我的Flex代码无法到达PHP,但当我正常运行时,它的工作方式如下
http://localhost/search/populate.php?urlWeb=http://www.google.com
$url = addslashes( $_GET['urlWeb'] );
if( !$url )
{
die( "You need to define a URL to process." );
}
else if( substr($url,0,7) != "http://" )
{
$url = "http://$url";
$output = "<loginsuccess>";
$output .="yes";
$output .= "</loginsuccess>";
print($output);
}<mx:HTTPService id="addWeb" resultFormat="object" result="Added(event)" showBusyCursor="true" method="GET" url="http://localhost/search/populate.php" useProxy="false">
<mx:request xmlns="">
<urlWeb>
{urlWeb.text}
</urlWeb>
</mx:request>
</mx:HTTPService>发布于 2009-06-17 19:39:44
这可能是一个crossdomain.xml问题。尝试放置具有以下内容的crossdomain.xml文件(http://localhost/crossdomain.xml):
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" to-ports="*" secure="false" />
</cross-domain-policy>然后再运行这个应用程序。如果它仍然不能工作,请您将错误处理程序添加到您的HTTPService中,检查您是否有错误,如果您在这里发布它,那么我们就可以看到问题所在了吗?
https://stackoverflow.com/questions/943849
复制相似问题