Using a USB cable:
(for example, if you use WAMP server):
1) Install your Android drivers on your PC and download portable Android Tethering Reverse Tool and connect your Android device through the Reverse Tool application.
2) Click on WAMP icon > Put Online (after restarting).
3) Open your IP in the Android browser (i.e. http://192.168.1.22
OR http://164.92.124.42
)
To find your local IP address, click Start>Run>cmd and type ipconfig and your IP address will show up in the output.
That's all. Now you can access (open) localhost from Android.