access localhost from mobile phone [closed]

安稳与你 提交于 2019-12-23 07:56:10

问题


I am working on a Mobile website using jquery mobile and would like to test it using my android Phone browser.

My Windows 7 machine and android phone are on the same wireless network.

I normally access the mobile site from my machine: "http://localhost/index.php/doctor"

I tried accessing it using the wireless network IP address from my mobile: "http://192.168.1.3/index.php/doctor"

but, I get web page not available error.

How do I access localhost from my android phone?!


回答1:


192.168.1.3 is the local network address. What you need to do, is get the external IP address, and put that into the phones URL. You can do this by going into the command line and typing ipconfig, this should give you all your machines IP addresses, along with the external IP for your local webserver. I doubt this has anything to do with your firewall. More than likely, you just need to find the correct IP address for your local webserver.

Hope this helps.



来源:https://stackoverflow.com/questions/11401235/access-localhost-from-mobile-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!