0

当我尝试调用 php.ini 时出现此错误。

加载失败:HTTP 状态 = 0 加载失败:IO 错误:错误 #2032:流错误。网址:http ://www.xxxxxxx.com/xxx/Login.php

请帮我解决这个问题,代码如下,

function checkLogin (e:Event):void
{           
    var phpVars:URLVariables = new URLVariables();
    var phpFileRequest:URLRequest = new URLRequest("http://www.xxxxxxx.com/xxx/Login.php");
    phpFileRequest.method = URLRequestMethod.POST;
    phpFileRequest.data = phpVars;
    phpLoader = new URLLoader();
    phpLoader.dataFormat = URLLoaderDataFormat.VARIABLES;   
    phpLoader.addEventListener ( IOErrorEvent.IO_ERROR, handleIOError );
    phpLoader.addEventListener(Event.COMPLETE, handleComplete );
    phpLoader.addEventListener ( HTTPStatusEvent.HTTP_STATUS, handleHttpStatus );
    phpLoader.addEventListener ( SecurityErrorEvent.SECURITY_ERROR, handleSecurityError);

    phpVars.userName = userName.text;
    phpVars.passwords = passwords.text;

    phpLoader.load(phpFileRequest);
}

        function handleHttpStatus ( event:HTTPStatusEvent ):void
        {
            trace ( "Load failed: HTTP Status = " + event.status );
        }
        function handleSecurityError ( event:SecurityErrorEvent ):void
        {
            trace ( "Load failed: Security Error: " + event.text );
        }
        function handleComplete ( event:Event ):Void
        {
            trace ( "The data has successfully loaded" );
        }
        function handleIOError ( event:IOErrorEvent ):void
        {
            trace ( "Load failed: IO error: " + event.text );
        }
4

1 回答 1

0

如果您说您已经测试过 PHP 工作正常,那么这可能是一个跨域问题,因为您正在尝试访问被阻止的域。

添加跨域策略文件。

更多信息在这里

于 2013-06-18T11:42:34.100 回答