I am new to cordova and want to transfer my existing app build with jquery mobile and php to iOS/Android. Am I correct, that there is no php interpreter inside cordova? That would mean, that the existing app is not transfarable to cordova as php is a central component in building those html files inside the project. This would make it kind of useless for me.
Is there a way to run php code inside cordova?
Actually, you could use Quercus in Java to feed HTTP parameters to a PHP interpreter, no IP port necessary (you can construct a HTTP-request-holding data object) and for IOS, something like https://github.com/grantjbutler/PHPTest.
There are other embeddable solutions for IOS, I may edit this answer further, in the near future.
PHP runs on the server-side; Cordova packages your app into a client-side application.
If you really really want to use your PHP server-generated HTML, rather than static HTML in your client-side app, you can package in an almost empty HTML file, and dynamically fetch HTML from your PHP server, AJAX or otherwise.
In today's age, with AJAX and HTML5 apps, most people will tell you that the server's role should not be to generate HTML files; it should be to generate data (JSON) through APIs. If you switch to such an architecture, you'll find that there are much more tools you can use easily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With