Saturday, July 31, 2010

Re: Outputting XML with PHP

Guessing that you are referring to this example
http://code.google.com/apis/maps/articles/phpsqlajax.html

> So I guess that brings to my next questions. Is
> it supposed to output a file onto my computer with the .xml file? Or
> is it supposed to just be in my browser.

You should have created a script like
phpsqlajax_genxml.php

You run that script by accessing it via its URL. That can be done by
pasting the url into a browsers address bar, or a javascript (in say a
map page) can access it by url too.

When the script is run, it generates XML on the fly from database
content. That is invisible to whatever called it, browser or
javascript. They would just get back the XML generated by the script
"looking like" they had just accessed a regular XML file.

Which means you should be able to paste the url of your own script
into your own browser, and see XML output - or an error message.

If you can't sort it out, go back to the example exactly as given, and
see if you can get that working before making your changes. If you're
not sure how the example is supposed to work, its likely your changes
haven't been appropriate.

--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate