开发者

Can I use php with phonegap?

开发者 https://www.devze.com 2023-02-07 11:14 出处:网络
I want t开发者_运维问答o know whether I can use php file with phonegap or not?No you cannot. Period. Not at all.However using phonegap you can load a website that runs PHPSince PHP is a server-side sc

I want t开发者_运维问答o know whether I can use php file with phonegap or not?


No you cannot. Period. Not at all. However using phonegap you can load a website that runs PHP


Since PHP is a server-side scripting language, your .php files will reside on the server side. You can however connect to php files on an external server and load the html it generates. If you do this, you won't be able to use the Phonegap API's though.

Ideally, you would communicate the external php file by using ajax and retrieve information provided by it to load another local html file that is residing in your assets/www/


you have to have your application logic in javascript to leverage phonegap. there is php interpreter on the phones just a webbrowser control execution your javascript.

For security purposes the javascript has be loaded from the index.html contained inside the app. (you can not navigate to another page)

so if there isn't any fancy php to javascript compiler i would say no

0

精彩评论

暂无评论...
验证码 换一张
取 消