【问题标题】:Connecting to localhost phpMyAdmin with android [closed]使用 android 连接到 localhost phpMyAdmin [关闭]
【发布时间】:2014-10-15 11:35:48
【问题描述】:

您好,我有一个本地主机 phpMyAdmin 和 php 代码。在本地主机上,我有一个名为 android_api 的数据库和一个名为 users 的表。在我的 JSONParser 中,我有这个代码。我使用 wamp,在 wamp 地图中我还有一张名为 WWW 的地图,在那里我有一张地图,其中包含所有名为 android_login 的 php 代码

在我的名为 UserFunction 的类中,我有这个代码

private static String loginURL = WHAT DO I PUT IN HERE?
private static String registerURL = AND HERE?

请大家帮忙

【问题讨论】:

  • phpmyadmin 是一个用于管理 mysql 数据库的网站。为什么需要以编程方式登录它?只需启动一个网络浏览器。
  • 我回答了尝试并更新

标签: php android mysql phpmyadmin


【解决方案1】:

从你的安卓模拟器访问你的本地主机使用ipconfig中给出的ip地址。

打开命令提示符->输入 ipconfig-> 获取 IPV4 地址....类似于 192.xx...

所以你的 URL="http://192.xx.xx.xx/loginAPI/file.php"

【讨论】:

  • 这个对吗----"192.xx.xx.xx/android_login.php所有php文件所在的map叫android_login,数据库叫android_api,table叫users
  • 您获得了系统的 IPV4 地址。它必须工作
  • 我正在使用它。您遵循了 androidhive.info 教程。对吗?
  • 是的,是的,indra,我在这行代码上得到了一个可悲的 nullpointerexeption 的异常 ---try { HERE IS THE EXEPTION----- if (json.getString(KEY_SUCCESS) != null) .. 此代码位于 UserFunction
猜你喜欢
  • 2016-06-01
  • 2018-10-17
  • 2017-11-08
  • 2014-10-19
  • 1970-01-01
  • 2021-09-10
  • 2014-08-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多