简体   繁体   English

如何从我的物理 Android 设备访问我的本地主机?

[英]How can I access my localhost from my physical Android device?

I have seen this question我看过这个问题

I am creating a flutter app and restful API with Laravel.我正在使用 Laravel 创建一个 flutter 应用程序和宁静的 API。 it is work on AVD with url = "10.0.2.2:8000".它适用于 url = "10.0.2.2:8000" 的 AVD。 and my browsers on computer url = "localhost:8000".和我在计算机 url = "localhost:8000" 上的浏览器。 I turned off the firewall on windows 10. I can access to Xampp dashboard from my phone's browser "192.168.1.8:80", but it doesn't work with port 8000我关闭了 windows 10 上的防火墙。我可以从手机浏览器“192.168.1.8:80”访问 Xampp 仪表板,但它不适用于端口 8000

My computer Ip我的电脑Ip

Xampp server Xampp 服务器

Try this:尝试这个:

php artisan serve --host 0.0.0.0 --port 80

Just make sure that the port is free.只要确保端口是空闲的。

Reference: https://stackoverflow.com/a/30675683/5192105参考: https://stackoverflow.com/a/30675683/5192105

php artisan serve --host=you ip address php 工匠服务 --host=you ip 地址

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

相关问题 如何从我的 Android 设备访问我的本地主机? - How can I access my localhost from my Android device? 如何从我的 Android 设备访问我的本地主机 - How can I access my localhost from my Android device 如何在 Android Studio 中将我的物理设备作为模拟器运行? - How can I run my physical device as an emulator in Android studio? 如何从Android手机访问本地XAMP服务器? - How can i access my localhost XAMP server from my Android mobile? 如何使用移动热点从Android应用(物理设备)向本地服务器发送HTTP消息 - How can I send http messages from android app( physical device) to my local server using mobile hotspot 如何在不使用互联网连接的情况下将android物理应用中的http消息发送到本地服务器? - How can I send http messages from android app( physical device) to my local server without using internet connection? 如何通过 Android 电话访问我的本地主机? - How can I access my localhost through Android phone? 无法再次访问我的android设备上的wamp服务器(本地主机) - Can't Access wamp server (localhost) on my android device again 无法在我的 android 设备上访问 wamp 服务器(本地主机) - Can't Access wamp server (localhost) on my android device 如何从我的Android设备访问我的本地REST API? - How can I access my local REST api from my android device?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM