Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php ReferenceError:Error#1069:在字符串上找不到属性,并且没有默认值_Php_String_Actionscript 3_Flash_Url - Fatal编程技术网

Php ReferenceError:Error#1069:在字符串上找不到属性,并且没有默认值

Php ReferenceError:Error#1069:在字符串上找不到属性,并且没有默认值,php,string,actionscript-3,flash,url,Php,String,Actionscript 3,Flash,Url,我正在使用URLRequest在flash中加载一个外部php文件。但不幸的是,我得到了这个错误- ReferenceError: Error #1069:Property email not found on String and there is no default value. at Main/variablesGot() at flash.events::EventDispatcher/dispatchEventFunction() at flash.event

我正在使用URLRequest在flash中加载一个外部php文件。但不幸的是,我得到了这个错误-

ReferenceError: Error #1069:Property email not found on String and there is no default value.
    at Main/variablesGot()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
以下是相关的as3代码

phpLoader.addEventListener(Event.COMPLETE, variablesGot);    
private function variablesGot(ev:Event):void

    {
        trace(ev.target.data.toString());  //THIS OUTPUTS CORRECTLY
        //OUTPUT for this trace is as follows
        //athleteName=ankur&email=email@yahoo.com&password=newpass&personalBest=9.58&shirtNumber=10         

        trace(ev.target.data.email.toString()); //LINE WITH ERROR
    }
下面是我正在加载的php文件中的相关php代码

print "athleteName=".$_SESSION[athleteName];
print "&email=".$_SESSION[email];
print "&password=".$_SESSION[password];
print "&personalBest=".$_SESSION[personalBest];
print "&shirtNumber=".$_SESSION[shirtNumber];
print "&country=".$_SESSION[country];

我想这个错误可能是由于我用php打印的方式造成的?但是我不确定。

默认情况下,
urloader
将数据作为文本加载,因此
电子邮件
不存在于原始
字符串上。尝试设置:

phpLoader.dataFormat = URLLoaderDataFormat.VARIABLES;