Webview in android able to run php

后端 未结 3 1048
北恋
北恋 2021-01-20 15:21

I am working on a Android Application that has web view where i need to load html, jquery and js and php also. Now i am able to load html jquery css javascript , But my prob

相关标签:
3条回答
  • 2021-01-20 15:37

    You almost certainly don't want to run PHP on your Android. But in case you do, then you would want http://code.google.com/p/php-for-android/. Better link: http://phpforandroid.net/

    0 讨论(0)
  • 2021-01-20 15:49

    PHP is a server side language. It cannot run inside the browser. It helps you to build the dynamic web pages.

    You can call any web page in the webview when you are online. it doesn't matter what is the server side language.

    When you are offline, you cannot send request to any server. so no question of executing any page.

    0 讨论(0)
  • 2021-01-20 16:00

    You can do it easyly with AndroPhp, just search it in Google play and install.

    Its like WampServer for Php+Mysql. You should run it than just create your PHP project under www/ folder and call it from Android webview 127.0.0.1:80/yourproject

    This way you you have local server on your Android, you shouldnt code in Java for Android all you can code in PHP. Maybe it is not a elegant way to code for Android but works !!

    0 讨论(0)
提交回复
热议问题