path: /OpenPlatform/Manage/index.phplocation:    D:\workspacephp\Project_openPlatform\trunk\OpenPlatform\Manage\index.phpDocumentRoot: 为 D:/workspacephp
我们如果要在浏览器中访问该应用的话,是应该输入 localhost:81//OpenPlatform/Manage/index.php
还是应该:localhost:81/Project_openPlatform/trunk/OpenPlatform/Manage/index.php我的理解是;我们输入 path就可以了,可以根据path定位到location,但是我发现这样不行。谁能给解释下?
location与path有什么关系?

解决方案 »

  1.   

    访问路径要看你web服务器初始根目录
    如: apache你会看 DocumentRoot
      

  2.   

      知道呀,DocumentRoot D:/workspacephp ...本来做java的,并且只工作了不到三个月,还是半路出家的,现在就让搞php,起步有些不明白。。
      

  3.   

    localhost:81/Project_openPlatform/trunk/OpenPlatform/Manage/index.php
    这个是正确的
      

  4.   

     我的感觉也是这样的,Path和location有什么关系?
      

  5.   

    path: /OpenPlatform/Manage/index.php
     -- 这个表示根目录下的 /OpenPlatform/Manage/index.php 文件
    location:    D:\workspacephp\Project_openPlatform\trunk\OpenPlatform\Manage\index.php
    -- 这个是文件的绝对路径
      

  6.   

    path -- 路径。用于指示文件在系统中的位置
    目前你遇到的系统有两个
    1、文件系统
    D:\workspacephp\Project_openPlatform\trunk\OpenPlatform\Manage\index.php
    表示的就是 index.php 在文件系统中的位置2、web系统
    localhost:81/Project_openPlatform/trunk/OpenPlatform/Manage/index.php
    表示的就是 index.php 在web系统中的位置
    localhost 表示统一资源定位(URL)的本地主机名
    local 本地
    host 主机