将 xml 作为变量从 php 发送到 flash

发布于 2024-11-17 11:43:15 字数 461 浏览 6 评论 0原文

我有一个 Flash 文件,可以从文件中传递 xml:

  1. script type="text/javascript">

  2. var flashvars = {};

  3. flashvars.xmlSource = "XML.xml";
    ...

  4. /脚本>

我可以将 xml 从 php 以变量形式发送到 flash 示例:

$xml = "?xml version="1.0 ...";

  1. script type="text/javascript">
  2. var flashvars = {};
  3. flashvars.xmlSource = ?php echo $xml; ...
  4. /脚本>

谢谢

I have a flash file where I can pass xml from file :

  1. script type="text/javascript">

  2. var flashvars = {};

  3. flashvars.xmlSource = "XML.xml";
    ...

  4. /script>

Can I send xml from php in varible to flash example:

$xml = "?xml version="1.0 ...";

  1. script type="text/javascript">
  2. var flashvars = {};
  3. flashvars.xmlSource = ?php echo $xml; ?>;
    ...
  4. /script>

thank you

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

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

发布评论

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

评论(1

三岁铭 2024-11-24 11:43:15

与第一个示例一样,但让 XML.xml 实际上是一个回显 XML 内容的 PHP 文件。 (或者将其命名为 xml.php 并将其作为 xml 文件名传递)

Do like in your first example, but let XML.xml actually be a PHP file that echoes out the XML content. (Or call it xml.php and pass that as the xml filename)

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