0

我有下面的xml代码:

<?xml version="1.0" encoding="UTF-8"?>

<santamaster>

<paths>
<thename >Agamemnonas</thename>
<soundpath startAt="0">sounds/namesounds/agamemnonas.mp3</soundpath>
<theage startAt="5000">sounds/ages/5.mp3</theage>
<theplace startAt="10000">sounds/places/ipiros.mp3</theplace>
<everyday startAt="15000">sounds/everyday/bravekid.mp3</everyday>
<youwill startAt="20000">sounds/youwill/listeryourparents.mp3</youwill>
<pic1 startAt="0">images/pic1.jpg</pic1>
<pic2 startAt="5000">images/pic2.jpg</pic2>
<pic3 startAt="10000">images/pic3.jpg</pic3>
<videofile>myvideo.mp4</videofile>
</paths>

</santamaster>

我正在尝试通过 php 文件和一些变量来回显此代码:

<?php
session_start();
header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="utf-8"?>';
echo'
<santamaster>

<paths>
<thename >Irene</thename>
<soundpath startAt="0">"'.$_SESSION['audiolink'].'"</soundpath>
<theage startAt="5000">"'.$_SESSION['age'].'"</theage>
<theplace startAt="10000">"'.$_SESSION['thelocation'].'"</theplace>
<everyday startAt="15000">"'.$_SESSION['dailylife'].'"</everyday>
<youwill startAt="20000">"'.$_SESSION['YOU_WILL'].'"</youwill>
<pic1 startAt="0">"'.$_SESSION['pimagepath'].'"</pic1>
<pic2 startAt="5000">"'.$_SESSION['eoneimagepath'].'"</pic2>
<pic3 startAt="10000">"'.$_SESSION['etwoimagepath'].'"</pic3>
<videofile>santavideo/sample.mp4</videofile>
</paths>

</santamaster>';

?>

但是什么也没发生。。

在此处输入图像描述

通过会话加载xml中的变量很重要,会话变量正在工作..我需要它来将它加载到flash电影中!

谢谢你们!

4

0 回答 0