Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Using AJAX with a PHP Front Controller
February 7, 2007, 1:16 pm
rate this thread
single point of entry to the application and the autoload function for
includes. I am trying to incorporate AJAX into the framework, but the
Can someone please provide me with some hints on how I can make this
work? Thank you.
Re: Using AJAX with a PHP Front Controller
Hard to say without knowing what your frontcontroller does, BUT the
(or whatever it is called in different browsers), you feed it the url,
check what your app returns.
Just make an alert in your JS with that url, and type that into a browser.
(Or when it is long, use prompt, so you can copy/paste it)
What does your application return?
PHP doesn't care if the XMLHTTPRequest makes a request, or somebody visits
your page 'normal'.
PHP just runs its script and produces the output.
So just debug your AJAX (and/or PHP) via direct calls to the url in your
cookie(s) the same way as a direct invocation via a browser would do. So
that should work alright.