PHP/Flash 集成不一致
我的 Flash 应用程序遇到一些一致性问题,当我回显 Flash 获取的变量时,它并不总是获取 PHP 发送的内容,它似乎因 PC 而异。
我正在从数据库获取信息,我需要将其传递到闪存,例如我需要发送 5 个变量 $uid,$name,$points,$from,$page ,我如何才能从PHP 使用 AMFPHP 来刷新?
有人告诉我 AMFPHP 将是在这种情况下使用的最佳工具,但我不知道它是如何工作的,并且网站上的示例代码对我来说并不完全有意义。
提前致谢!
I am having some consistency problems with my flash application, when I echo out variables for flash to get, it doesn't always pick up what PHP is sending, it seems to vary from PC to PC.
I am getting info from a database, and I need to pass it to flash, say for instance I need to send through 5 variables $uid,$name,$points,$from,$page , how could I go about sending these from PHP to flash using AMFPHP?
I was told that AMFPHP would be the best tool to use for such situations, but I have NO knowledge of how it works and the sample code on the site is not making complete sense to me.
Thanx in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无法将其从 PHP 推送到 Flash - 通信必须由 Flash 端发起。为此,您不需要 AMFPHP;只需使用
URLLoader
即可。在
page.php
中,只需执行一个简单的 echo:You cannot push it from PHP to Flash - the communication has to be initiated by the Flash end. And you don't need AMFPHP for this; just use a
URLLoader
.inside the
page.php
, just do a simple echo:仅仅为了将几个变量发送到 flash 文件而使用 AMFPHP 似乎很麻烦。我建议您尝试:
以上所有内容对我来说一直有效。
It seems a hassle to get involved with AMFPHP just to send a couple of variables to a flash file. I suggest you try:
All of the above have worked consistently for me.