用记事本打开C:\WINNT\system32\drivers\etc\hosts 我的内容为 # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host127.0.0.1 localhost 10.70.38.10 ColligateStatistic 10.70.38.10 River 10.70.38.10 DigitalTitan 10.70.38.10 localhost 可以看到默认localhost代表回环地址.怎么映射自己写吧
127.0.0.1=你的IP地址”
那说明localhost和我本机的IP是同样的嘛,为什么用localhost就无法跳转呢?想不通
我的内容为
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host127.0.0.1 localhost
10.70.38.10 ColligateStatistic
10.70.38.10 River
10.70.38.10 DigitalTitan
10.70.38.10 localhost
可以看到默认localhost代表回环地址.怎么映射自己写吧
localhost=127.0.0.1
127.0.0.1 != 你的IP地址 要使用 IP地址 好用,那么,用127.0.0.1就不好用了。
,我想知道的是用本机IP进行页面跳转成功的话,用Localhost应该也是成功的。不是嘛?
那b访问的时候http://localhost..
这样就是b自己机器上的了,而不是a上的了。那你在本机上也不行吗?
192.168.0.232为网络IP
详情找一本网络技术的书看看就知道了