PHP 和 FlashVars 通信

发布于 2024-11-26 09:02:28 字数 331 浏览 5 评论 0原文

这是我需要维护的一个简单问题。我需要将 PHP 变量传递到 FlashVars 中。

<param name=FlashVars value='sourceUrl=<?php echo $fileName;?>'>

如果我使用 其中 videoSource = $fileName$fileName 类似于(视频/video.flv)它不会工作。非常感谢任何帮助

Here is a simple problem I need to maintain. I need to pass PHP variable into FlashVars.

<param name=FlashVars value='sourceUrl=<?php echo $fileName;?>'>

If I use <param name=FlashVars value='sourceUrl=videoSource'> where videoSource = $fileName and $fileName is something like(Video/video.flv) it won't work. Any help is greatly appreciated

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如痴如狂 2024-12-03 09:02:28

也许您需要

 <?php echo urlencode($filename); ?>

在操作脚本中使用转储 flash var - 如果它显示正确,则问题出在操作脚本代码的其他位置。或者在这种情况下,可能是文件路径问题或文件权限问题。

将 flashvar 传递到 flash 中不太可能出现问题。

Perhaps you need to use

 <?php echo urlencode($filename); ?>

Dump the flash var in action script - if it appears correctly, then the issue is elsewhere in your action script code. Or in this case it could be a filepath issue or a file permissions issue.

It is unlikely to be an issue with passing the flashvar into flash.

剩一世无双 2024-12-03 09:02:28
document.writeln("<param name=FlashVars value='sourceUrl= \""+videoSource+"\"'>");

videoSource 采用这种方式 $fileName 的值 var videoSource=""; 问题解决了。

document.writeln("<param name=FlashVars value='sourceUrl= \""+videoSource+"\"'>");

videoSource takes value of $fileName this way var videoSource="<?php echo $fileName;?>"; Problem solved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文