Ajax query is breaking due to trying to redeclare php class
I have an ajax request that requests a php script that connects to my server and returns some results
This works fine locally and works the for the first ajax call in the titanium app, but the second call in the titanium app returns a fatal error: Cannot redeclare class DataBase in ….
Any one got any ideas as to why this might be
Cheers
Luke
2 Answers
-
Accepted Answer
I'm not sure why you would be making an Ajax call to a PHP script in your own Desktop application. Couldn't you simply invoke a PHP function directly in your app? Here is the guide on using PHP in your desktop application if you haven't come across it already - check out the various methods of including a PHP script in your page, and then invoking a function.
If you have a specific reason for needing to do what you are doing, let everyone know, but if you just want to call PHP code from your app, I would just include the PHP script and invoke a function directly.
Or is this PHP script running on your server?
-
I need it here to make use of editable tables using TableGear