我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何从服务器(10.0.2.2)执行Android Call php功能?

With reference to this link open a url on click of ok button in android

i want to call php function in my xampp server by the builder button click "ok"

Uri uri = Uri.parse("10.0.2.2/sth.php?runFunction=true");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

PHP:

<?php 
if($_GET["runFunction"] == true){
    myFunction();
}

function myFunction(){
    ...
}
?>

近期文章

  • 使用php mysqli确实存在数据库中的检查记录
  • 保持html / php表单超时
  • 语法错误,意外T_PRIVATE - Magento
  • Laravel 4 - 使用php array_push中的id
  • 带有选择数据的MySQL更新表
  • 找不到Highcharts的正确JSON数组语法
  • 我需要一个MySQL查询来查找表中的总计数
  • 在登录流程中捕获用户组,如果属于某个组,则删除对前端的访问权限
  • Jquery分离
  • PHPMailer,SMTP错误无法连接到smtp主机
  • 如何将每个JSON行添加到全局jQuery变量中?
  • PHP / MYSQL:如果记录尚未在数据库中,则值为0
  • 如何格式化Apache记录错误的方式?
  • 关于数据库性能的问题以及更多[关闭]
  • Phalcon关系不起作用
  • 保留SQL插入的换行符 - PHP
  • preg_replace with preg_quote除了一列
  • ftp_put()函数问题。 得到警告。 如何解决这个问题?
  • 我正在尝试将Javascript函数值放入Mysql数据库中
  • 回应使用MySQL从数据库中提取数据的按钮

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华