localhost=127.0.0.1
127.0.0.1=你的IP地址

解决方案 »

  1.   

    对啊“localhost=127.0.0.1
    127.0.0.1=你的IP地址”
    那说明localhost和我本机的IP是同样的嘛,为什么用localhost就无法跳转呢?想不通
      

  2.   

    你试试你的http://localhost:8080能不能访问?
      

  3.   

    用记事本打开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代表回环地址.怎么映射自己写吧
      

  4.   

    用127.0.0.1可以那么用localhost也应该可以的啊!不过你为什么不用相对地址呢,那样当你所放置的位置变了的时候可以不要更改转向的地址啊!
      

  5.   

    localhost 不是代表你的本机IP,虽然有的时候两个的作用是一样的,localhost代表的是你的本机名称,本机IP是 127.0.0.1  比如你的机器的名称是 computer1 ,你本机配置的IP是192.168.0.32(局域网)  那么对应的关系就是  localhost=computer1  192.168.0.32=127.0.0.1
      

  6.   

    同意楼上的观点,应该用相对地址比较规范,另外,
    localhost=127.0.0.1
    127.0.0.1 != 你的IP地址 要使用 IP地址 好用,那么,用127.0.0.1就不好用了。
      

  7.   

    问题是用本机名称访问和用本机IP访问性质是一样的吧。用localhost不是最终映射到本机的IP进行访问嘛?
      

  8.   

    好像还是没有人真正解答我的问题,我不是问Localhost和本机ip的区别
    ,我想知道的是用本机IP进行页面跳转成功的话,用Localhost应该也是成功的。不是嘛?
      

  9.   

    如果你的机器是a
    那b访问的时候http://localhost..
    这样就是b自己机器上的了,而不是a上的了。那你在本机上也不行吗?
      

  10.   

    localhost=127.0.0.1
    192.168.0.232为网络IP
    详情找一本网络技术的书看看就知道了
      

  11.   

    通常localhost=127.0.0.1,不一定等於本機ip,本機ip可以有多個iis之類可以指定ip的,所以192.168.0.33可以,127.0.0.1不一定可以