简体   繁体   中英

Filling Flash as3 playlist with XML generated from mySQL via php

I have an online flash video player fed by a playlist driven by XML.

This XML is generated from a mySQL database via 'playlist.php'.

The issue I am having is that when I feed the php generated xml into the player, it only reads the top level/hierarchy of xml information into the playlist (ie gallery level, when below that is category, and ultimately video).

When I copy the output of the php generated xml into a normal xml file (ie playlist.xml), the playlist is fed with all of the appropriate information, and is complete.

Can you tell me why my flash (as3) video player and playlist will recognise 'playlist.xml' but not 'playlist.php' information?

Links to both files are below:

http://www.sportshound.co.uk/Source%203/output/playlist.php

http://www.sportshound.co.uk/Source%203/output/playlist.xml

A link to the player, which is currently hooked up to 'playlist.php' is at the same address but with theater.html instead of playlist.

you PHP file only contains CONTENT and GALLERY nodes whereas the xml file also has ITEMs. seems there is a problem expoting your data from MySQL as xml.

btw: think about not using so many attributes - use subnodes instead. there you can add the CDATA sections.

You have different contents comming from XML and PHP files.

And before exporting the XML from PHP you needto add:

header ("Content-Type:text/xml"); 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM