android - Not able to access localhost on android device on the same network
问题描述
I have installed apache2 on ubuntu and then using it to setup localhost which although can be accessed on the same computer but not on the android on the same network. I remember i could do this previously but now it isn't happening. I want to send files to my android through localhost quickly. Any solution?
解决方案
要从设备访问本地服务器,您应该将代码中的 URL 设置为本地 ip 而不是 127.0.0.1 CMD>ipconfig> (IPv4 地址......
然后连接到同一个网络,一切都很好,或者您可以下载Xampp 作为其支持的 Linux 操作系统,并将自动安装所需的工具,如
Apache2 , Mysql 并支持 MariaDB + PHP + Perl
您可以在此线程中找到有用的答案 如何从我的 Android 设备访问我的本地主机?问
正如它之前回答的那样
推荐阅读
- npm - 错误 这可能不是 npm 的问题。上面可能有额外的日志输出
- if-statement - AppleScript 中的有限 IF 语句?
- python - 从数组列表中查找唯一代表(元素)的列表
- html - input type="button" 元素是只读的吗?Firefox 似乎是这么认为的:
- r - R中带有集成for循环的用户构建功能
- testing - 赛普拉斯测试字符串作为 HTML
- javascript - 使用 fetch 发布多个对象后反序列化 JsonElement
- git - 如何仅检查服务器上更新 git 挂钩的新提交?
- reactjs - 在 React/Redux 中的组件之间传递数据
- http - 如何使用带有 url 编码正文的 http.post 下载文件?