2009-06-03 10 views
0

Mein Flex-Code ist nicht in der Lage, die PHP zu erreichen, aber wenn ich es normalerweise tun es funktioniert wieHTTPService- Hilfe

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> 

Antwort

0

es sein kann, crossdomain.xml Problem. Versuchen Sie, eine crossdomain.xml-Datei platzieren (http://localhost/crossdomain.xml) mit folgendem Inhalt:

<?xml version="1.0"?> 

<cross-domain-policy> 

    <allow-access-from domain="*" to-ports="*" secure="false" /> 

</cross-domain-policy> 

und die App erneut aus. Wenn es immer noch nicht funktioniert, können Sie Ihrem HTTPService bitte einen Fehlerbehandler hinzufügen, prüfen, ob Sie einen Fehler haben und ob Sie ihn hier veröffentlichen, damit wir sehen können, wo das Problem liegt?