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
精彩评论