PDA

View Full Version : Problem loading php result in an XML format


servalman
11-07-2003, 07:52 AM
Hello everyone before sending this i looked over and over for some solutions so please HEEEEEEEEEEEEEEEEEELP ME !!!

< HERE IS THE CASE> <ALL FILES IN PHP.zip>

I got a nice php script that gives me a result (see REQUEST RESULT_XML.txt) in an XMl form.

If i try to load my result in flash from the script (see TEST.fla) it doesnt work usin XML object.

If now i copy my result in a xml file(see REQUEST RESULT_XML.xml) and try to load it in flash using xml object (see TEST.fla) it works fine.

I don't get it .

Thanks a lot for helping

freddycodes
11-07-2003, 01:43 PM
One thing I noticed is your php script, has

"" those funny characters on the first line before the opening php tag.

Secondly if you view your php script in a browser do you get the expected output?

servalman
11-07-2003, 01:57 PM
FIRST THANK YOU FOR ANSWERING ;)


ANSWER TO QUESTION n°1 : Strange i dont have them so take them of i you wanna try.

ANSWER TO QUESTION n°2 : I don't get a proper XML output in the browser but the source code is what i copied in my REQUEST_RESULT_XML.txt file and this is corect XML (i think) in the browser i get something like:

databsefieldname0 databsefieldname1 databsefieldname2 databsefieldname3 and so on.

What do you think ?

freddycodes
11-07-2003, 03:26 PM
So if you right click on the screen and select view source, you see the xml output?

servalman
11-08-2003, 10:58 AM
YES EXCACLTLY >>>>
So i supose that is the return of my script ?

Thanks

freddycodes
11-08-2003, 11:53 AM
Yes that is correct. Next question,


stockxml.load("SCRIPT.php");// doesnt work


How are you testing this are you using Control > Test Movie from with flash?

Are you actually looking at in a browser like www.mydomain.com/someflashmovie.html


Because I think you are doing the first, since you are using trace() alot.

So php needs a web server to parse the php. I would suggest providing the full url of the php script.

Assuming your web server is at localhost.


stockxml.load("http://localhost/folder/with/phpscript/SCRIPT.php");// doesnt work

servalman
11-08-2003, 12:04 PM
YU 'RE RIGHT AND I FEEL STUUUUUUUUUUUUUUUPID !!

THANK's A LOT ;)