Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Url “正确”;“基本路径”;术语_Url_Path_Terminology_Definition_Convention - Fatal编程技术网

Url “正确”;“基本路径”;术语

Url “正确”;“基本路径”;术语,url,path,terminology,definition,convention,Url,Path,Terminology,Definition,Convention,考虑安装在“mysite”目录中的网站: /var/www/html/mysite/index.php 文档根=/var/www/html url=www.mysite.com/mysite/index.php 您将以下内容称为什么: /var/www/html/mysite/index.php(基本路径?根路径?) /var/www/html/mysite/index.php-或-www.mysite.com/mysite/index.php(路径?基本路径?) www.mysite.com/

考虑安装在“mysite”目录中的网站:

/var/www/html/mysite/index.php

文档根=
/var/www/html

url=
www.mysite.com/mysite/index.php

您将以下内容称为什么:

  • /var/www/html/mysite/index.php(基本路径?根路径?)
  • /var/www/html/mysite/index.php-或-www.mysite.com/mysite/index.php(路径?基本路径?)
  • www.mysite.com/mysite/index.php(基本URL)

  • 我似乎想不出一个明确的名字来区分1和2

    我来自ruby on rails的背景,但是

    1) 基本路径或根路径用于此操作。选择一个并保持一致:) 3) 在RoR中,我们称之为“根url”,但它也有点像“主路径”。 至于2-它在rails中没有出现(或者至少我们没有它的名字)

    听起来,以下内容应该是一致的,而不会混淆所有内容:

  • 基本文件路径==/var/www/html/mysite//index.php
  • 根文件路径==/var/www/html/mysite/index.php
  • 根url==www.mysite.com/mysite/index.php
  • 另一种选择是:

  • 根文件路径
  • 主文件路径
  • 主页url

  • 我的2c:)

    证明这些可以通过多种方式引用。我将在这里列出我找到的这些文件:

    输入:


    2=script_prefix

    感谢RoR透视图-我意识到确实没有规范标准,每个系统平台的名称都有自己的变体。我会给你答案,因为这是许多答案中的一个有效答案。(更多信息请参见我的答案…)