【问题标题】:What is the term for a name converted to a URL parameter?将名称转换为 URL 参数的术语是什么?
【发布时间】:2014-02-15 20:40:22
【问题描述】:

当您将名称转换为 URL 参数(例如 PHP 中的 urldecode())时,我想知道它叫什么 - 如果它有任何名称。

假设在我的数据库中,我列出了一些电视剧,其中一行是生活大爆炸,我通常这样做:

title                  name
------                 -----
The Big Bang Theory    the-big-bang-theory

那么第二列是否有一个特定的名称,名为“名称”?

我记得某个 CMS 中的“slug”或“stub”之类的东西。

【问题讨论】:

    标签: url terminology urldecode


    【解决方案1】:
    http://example.com/articles/the-big-bang-theory?revision=1
    
    • Path:
      /articles/the-big-bang-theory

    • 路径段/子组件:
      articles
      the-big-bang-theory

    • Slug(不是技术上定义的术语):
      the-big-bang-theory


    http://example.com/articles/427ds17v223?revision=1
    
    • Path:
      /articles/427ds17v223

    • 路径段/子组件:
      articles
      427ds17v223

    • Slug(不是技术定义的术语):
      ,或427ds17v223


    slug 一词有多种定义。有些人可能总是将最后一个路径段称为slug,有些人可能只在最后一个路径段是人类可读/可理解的时才使用这个术语。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-12-04
      • 1970-01-01
      • 2021-12-22
      • 1970-01-01
      • 1970-01-01
      • 2012-01-23
      • 1970-01-01
      相关资源
      最近更新 更多