Actionscript 3 Can';t访问IntelliJ中Flexunit测试中MAMP上托管的php文件

Actionscript 3 Can';t访问IntelliJ中Flexunit测试中MAMP上托管的php文件,actionscript-3,intellij-idea,mamp,flexunit,Actionscript 3,Intellij Idea,Mamp,Flexunit,我正在MAMP中运行主机,可通过和访问 我的问题是,我的flexunit测试无法访问在该主机上运行的php脚本 根目录下是crossdomain.xml文件: <?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <site-c

我正在MAMP中运行主机,可通过和访问

我的问题是,我的flexunit测试无法访问在该主机上运行的php脚本

根目录下是crossdomain.xml文件:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
    <site-control permitted-cross-domain-policies='all'/>
    <allow-access-from domain='*' to-ports='*'/>
    <allow-access-from domain="localhost" to-ports="*"/>
</cross-domain-policy>
然后是安全沙箱冲突:

connection to https://myapp.co.uk:8890/path/to/script.php halted - 
not permitted from file:///Users/me/path/to/output/_flexunit.swf
不管我是让crossdomain.xml文件自动加载,还是使用
Security.loadPolicyFile(…)

我正在通过IntelliJ IDEA中的flexunit任务运行我的flexunit测试

有什么建议吗?我被难住了



另外:应用程序的swf能够访问MAMP文件没有问题,只有flexunit测试不能。我想知道这是否与将测试结果返回IntelliJ IDEA的套接字有关。

这是一个安全问题,您不能使用crossdomain.xml在计算机上访问swf的网站。您必须在计算机上手动指定受信任的SWF或目录

  • 右键单击flash player并转到“全局设置”
  • 打开全局安全设置面板
  • 单击编辑位置并添加文件或文件夹

您可以通过屏幕截图查看此信息。

这是一个安全问题,您不能使用crossdomain.xml在计算机上访问swf的网站。您必须在计算机上手动指定受信任的SWF或目录

  • 右键单击flash player并转到“全局设置”
  • 打开全局安全设置面板
  • 单击编辑位置并添加文件或文件夹
您可以通过屏幕截图查看此信息

connection to https://myapp.co.uk:8890/path/to/script.php halted - 
not permitted from file:///Users/me/path/to/output/_flexunit.swf