简体   繁体   English

如何访问android设备中的LAMP localhost进行测试?

[英]How to access LAMP localhost in android device for testing?

I am developing a Wordpress site in Linux using LAMP environment.我正在使用 LAMP 环境在 Linux 中开发一个 Wordpress 站点。 I want to test the look and feel of the site in a mobile device.我想在移动设备上测试网站的外观。 I have an android device.我有一个 android 设备。

Is it possible to test my Linux localhost site in an android device using wifi or USB?是否可以使用 wifi 或 USB 在 android 设备中测试我的 Linux 本地主机站点? If yes, how?如果是,如何?

Using - Ubuntu 12.04 - XAMPP Linux 1.8.0 - Android 4.0使用 - Ubuntu 12.04 - XAMPP Linux 1.8.0 - Android 4.0

Note: Before you dismiss this question as possible duplicate, I checked the stackoverflow questions but nothing helped.注意:在您认为这个问题可能重复之前,我检查了 stackoverflow 问题,但没有任何帮助。

Open for editing!打开编辑!

If both your device and your LAMP setup are on the same.network, no problem.如果您的设备和 LAMP 设置都在同一个网络上,没问题。 Just let the URL (on Android) be the IP- adress of your Site (for example http://192.168.0.5/yourwordpresssite )只需让 URL(在 Android 上)成为您网站的 IP 地址(例如http://192.168.0.5/yourwordpresssite

You can also use an android emulator.您还可以使用 android 模拟器。 The emulator has access to the loopback address via 10.0.2.2.仿真器可以通过 10.0.2.2 访问环回地址。

see: http://developer.android.com/tools/devices/emulator.html#emulato.networking请参阅: http://developer.android.com/tools/devices/emulator.html#emulato.networking

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM