Reading php generated XML in flash?

前端 未结 2 1793
后悔当初
后悔当初 2020-12-21 12:14

Here is part 1 of our problem (Loading a dynamically generated XML file as PHP in Flash).

Now we were able to get Flash to read the XML file, but we can only see the

相关标签:
2条回答
  • 2020-12-21 12:43

    I guess that was the answer. I needed to add the charset=UTF-8 into my php. Now everything seems to be working as planned.

    0 讨论(0)
  • 2020-12-21 13:02

    Not a full solution, but just a data point (because encoding issues suck). When I downloaded your XML via the static file and PHP file and diffed them, I got the following results

    % diff php.xml static.xml
    1c1
    < <?xml version="1.0"?>
    ---
    > <?xml version="1.0"?>
    10a11
    >
    19a21
    >
    

    Your static file has an extra "non-ASCII" character at the start of it.

    My guess is your static XML file has a UTF-8 BOM that PHP generated file doesn't, and that your flash movie is expecting a UTF-8 file. I'd try generating a BOM with your PHP XML file and seeing it it helps, or fiddling with your server's encoding settings.

    Try changing you PHP so it outputs the following header (matching the web page the movie is embedded in).

    header('Content-Type: text/html; charset=UTF-8') 
    
    0 讨论(0)
提交回复
热议问题