Use your phone to access pages written on your computer
To do mobile development is to develop the environment, but we may be able to think we can be developed at the end of the PC, and then preview the effect on the phone, so that we develop the following advantages:
1. Convenient code, can see the effect, do not need to rely on the installation environment.
2. We can also do mobile development demo at home, so that we can learn more about mobile development knowledge points, reduce the pressure on the work.
Let's learn how to use the PC-side development page and then preview the effect on the phone!!
A: build the local server environment, I am the front-end developer, on the server side is not very understanding, so simple to build a PHP environment, directly installed WAMP5 software, OK directly built a simple environment.
Two: set up WiFi hotspot on your own computer.
1. The administrator runs the following command:
Netsh wlan show drivers
2. You can create a new bat file, such as Wifi.bat, with the following code:
Netsh wlan set hostednetwork mode=allow Ssid=tugenhua key=12345678
mode: Whether to enable the virtual WiFi network card, to disallow is disabledSSID: Wireless network name, English security No side effects, here with Tugenhua do network namekey: Password, preferably eight characters or more. directly open, run, and then generate a "wireless network Connection" on "Network Connections". such as: then click on the local Area Connection right-click Properties, switch to the Share button, as follows: 3. Run again to start the virtual network card.
Netsh wlan start hostednetwork
4. View the local IP as follows:
Start the server, directly on the local access to this IP or mobile phone access to this IP is not accessible, the following prompt:
5. Modify the Apache http.conf file:
By commenting out all of the deny from the all line and restarting the server, you can use your mobile phone to access the Web page on our computer, which is very convenient for mobile development and we do not need to install the environment.