使用使用Flex(Flash Builder的)AIR应用程序的远程PHP服务? [英] Using a remote PHP service with Flex (Flash Builder) AIR Application?

查看:120
本文介绍了使用使用Flex(Flash Builder的)AIR应用程序的远程PHP服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用Flash Builder 4,这个应用程序需要访问这些被存储在远程Web服务器上的远程PHP服务Adobe AIR应用程序。

I'm developing a Adobe AIR application using Flash Builder 4. This app needs to access a remote PHP service which is being hosted on a remote web server.

我有麻烦搞清楚如何添加它使用远程服务的PHP数据服务。我可以在Flash Builder中添加PHP数据服务作为一项服务托管在本地主机,但考虑到这是不可行的,当应用程序部署,将无法正常工作。

I am having troubles figuring out how to add a PHP data service which uses a remote service. I can add the PHP data service in Flash Builder as a service hosted on localhost, but given that this will not be feasible when the application is deployed, will not work.

有谁知道如何一个Flash Builder(Flex的)项目连接到远程PHP数据服务?

Does anyone know how to connect a Flash Builder (Flex) project to a remote PHP data service?

谢谢, 克里斯

推荐答案

好吧,我想我想通弄明白了。下面是我把得到它的工作在远程服务器上的步骤:

Ok, I think I got it figured out. Here's the steps that I took to get it working on the remote server:

  1. 第一,服务应设置在Flash Builder为本地计算机(本地服务器上运行)上的数据服务。

  1. First, the service should be set up from Flash Builder as a data service on your local computer (local server running).

在您检查,以从本地计算机确保维修工作,上传你的PHP服务文件到远程服务器。另外,上传两个gateway.php,amf_config.ini和ZendFramework文件夹。

After you have checked to make sure the service works from your local machine, upload your PHP service file to the remote server. Also, upload both gateway.php, amf_config.ini, and the ZendFramework folder.

请一定要保持文件夹结构相同的远程服务器上。

Make sure to keep the folder structure the same on your remote server.

添加一个构造函数来在Flash Builder中service.as文件如下一行:

Add a constructor to your service.as file in Flash Builder with a line as follows:

_serviceControl.endpoint = "http://www.remote.com/gateway.php"

当URL指向远程gateway.php。

Where the URL is pointing to your remote gateway.php.

请确保在远程服务器上的amf_config.ini文件配置是否正确。

Make sure your amf_config.ini file on the remote server is configured correctly.

这篇关于使用使用Flex(Flash Builder的)AIR应用程序的远程PHP服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆