如何在Cordova中运行php代码? [英] How to run php code inside cordova?
问题描述
我是Cordova的新手,并且想要将使用jquery mobile和php的现有应用程序版本转移到iOS/Android.我是否正确,cordova中没有PHP解释器?那将意味着,现有的应用程序无法移植到cordova上,因为php是在项目内部构建这些html文件的核心组件.这对我来说将毫无用处.
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.
有没有办法在cordova中运行php代码?
Is there a way to run php code inside cordova?
推荐答案
您不能在cordova内部使用任何服务器端脚本语言(例如:PHP).但是,使用Jquery和AJAX可以调用php函数并轻松获取数据.
You cannot use any server-side scripting language (ex: PHP) inside cordova. But using Jquery and AJAX you can call php functions and get data easily.
这篇关于如何在Cordova中运行php代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!