如何从移动设备连接到我的localhost项目?

I´m developping a website with mobile version, and I Want to test in my smartphone how The website is behaving in this device. I tried to acess my localhost from my mobile but its not working. Anyone there knwos how I can connect to my localhost project from my mobile?

you can do it by modifying httpd.conf in Apache you have to set up

find following code and replace From:

<Directory "c:/wamp/www/">
 #onlineoffline tag - don't remove
 Order Deny,Allow
 Deny from all
 Allow from 127.0.0.1
 </Directory>

To:

<Directory "c:/wamp/www/">
 #onlineoffline tag - don't remove
 Order Deny,Allow
 #Deny from all
 Allow from all
 </Directory>

and turn on WiFi, put the IP address in your mobile. Now Done!

If your mobile connected to the same Wifi, then first find out your router external IP address, then forward some port to that localhostIP:portno and finally you'll be able to see that server from your device.

in windows we can forward Ipaddress as below

netsh interface portproxy add v4tov4 listenport=port listenaddress=IP connectport=80 connectaddress=yourlocalhost IP