- 724 Posts
- 3 Reply Likes
Posted 4 years ago
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
READ!!!!
FAQ
FAQ
Q: CAN YOU USE PHP/ASP/JSF/JAVA/.NET WITH PHONEGAP?
A: A PhoneGap application may only use HTML, CSS, and JavaScript. However, you can make use of network protocols (XmlHTTPRequest, Web Sockets, etc) to easily communicate with backend services written in any language. This allows your PhoneGap app to remotely access existing business processes while the device is connected to the Internet.
Chris Griffith, Champion
- 347 Posts
- 92 Reply Likes
No, server side solutions will not run locally on the device. You can use PHP to power your remote service that the app can call, but you can not run PHP locally.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Ah. I agree.
That's why I mentioned "(But you will - safely - have assumed that this was not what the OP had in mind) ", when Chris claimed that "server side solutions will not run locally on the device".
Installing a webserver with PHP first is something you would only do for projects in a non-public environment.
That's why I mentioned "(But you will - safely - have assumed that this was not what the OP had in mind) ", when Chris claimed that "server side solutions will not run locally on the device".
Installing a webserver with PHP first is something you would only do for projects in a non-public environment.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
BTW: this would be a webserver plugin for Cordova:
https://www.npmjs.com/package/cordova...
I just don't see if a PHP engine is included. It might not interprete PHP.
https://www.npmjs.com/package/cordova...
I just don't see if a PHP engine is included. It might not interprete PHP.
- 283 Posts
- 40 Reply Likes
Ah, I missed that one, searched for server and when I saw it I thought it was some kind of fork from cordova-plugin-http. For ios there are a few more, used to workaround some WKWebView issues. But any of them support PHP.
- 724 Posts
- 3 Reply Likes
Sir, Chris Griffin but we can use php locally with the help of LOCAL WEB SEVERS Like WAMP, MAMP, XAMP etc?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 724 Posts
- 3 Reply Likes
Then how we can use PHP ? I mean to say that how we can use PHP with html5?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
In fact, it is no different from any decently designed MVC based website. In such web application, you would also separate data handling, business logic and presentation.
By now, the times where database requests, application logic and html form/design elements were all packed together in a single PHP document, should be considered history (I hope).
By now, the times where database requests, application logic and html form/design elements were all packed together in a single PHP document, should be considered history (I hope).
- 724 Posts
- 3 Reply Likes
I am using Windows(O.S.) and also using a local webserver WAMP i have also created dynamic websites but my .php files phonegap build can't support.
- 283 Posts
- 40 Reply Likes
Your .php have to stay on your WAMP server, and you hae to use XHR calls (AJAX) to that server. If you don't know how to do it, google about XHR
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Well, it's the device OS that doesn't interprete PHP scripts. Phonegap Build is just the assembler of your .apk/.ipa, not the live environment.
So, you will have to redesign your application in such a way as to create PHP webservices that handle ajax/xhr requests from the app.
So, you will have to redesign your application in such a way as to create PHP webservices that handle ajax/xhr requests from the app.
- 724 Posts
- 3 Reply Likes
Thank You :) now i cud google XHR calls thanks again
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
- 724 Posts
- 3 Reply Likes
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers




