正确的“基本路径”术语
考虑安装在“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。
Consider a website installed in the 'mysite' directory:
/var/www/html/mysite/index.php
document root = /var/www/html
url = www.mysite.com/mysite/index.php
What would you call the following:
- /var/www/html/mysite/ index.php (Base path? Root path?)
- /var/www/html /mysite /index.php -or- www.mysite.com /mysite /index.php (Path? Base path?)
- www.mysite.com/mysite/index.php (Base URL)
I can't seem to come up with a clear cut name to distinguish 1 and 2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我来自 ruby-on-rails 背景,但是...
1) 为此使用基本路径或根路径。选择一个并保持一致:)
3) 在 RoR 中,我们称之为“根 url”,但它也有点像“主路径”。
至于2 - 它不会出现在rails中(或者至少我们没有它的名称)
,听起来以下内容是一致的,不会混淆它们:
另一种选择将是:
my 2c :)
I'm from a ruby-on-rails background but...
1) either base-path or root path are used for this. Pick one and be consistent :)
3) in RoR we call this the "root url" but it's also kinda the "home path" too.
as to 2 - it doesn't occur in rails (or at least we don't have a name for it)
it sounds like the following would be consistent without confusing them all:
An alternative would be:
my 2c :)
事实证明,这些可以通过多种方式引用。我会在这里列出它们:
在 Django:
2 = script_prefix
Turns out these can be referred to in a variety of ways. I'll list them here as I find them:
In Django:
2 = script_prefix