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 - Fatal编程技术网

URL的语法是什么

URL的语法是什么,url,Url,有人能用外行的术语解释网址URL的语法吗。protocol://subdomain.domain.topLevelDomain:port/path/path.extension?query&morequery=value#fragment 主要是网络 [protocol]://[host/domain name][:port]/[path to resource] protocol - http, https, ftp, etc host/domain name - www.example.c

有人能用外行的术语解释网址URL的语法吗。

protocol://subdomain.domain.topLevelDomain:port/path/path.extension?query&morequery=value#fragment 主要是网络

[protocol]://[host/domain name][:port]/[path to resource]

protocol - http, https, ftp, etc
host/domain name - www.example.com, localhost, 192.34.12.1, etc
port - 80 by default for http, can be something else too
path to resource - /images/test.gif, /index.php

或者看看外行的解释。

protocol://subdomain.domain.topLevelDomain:port/path/path.extension?query&morequery=value#fragment 主要是网络

或者查看一个很好的外行解释。

看看下面描述的内容:

统一资源定位器(URL),即 形式化语言的语法和语义 信息的位置和访问 通过互联网获取资源

以下是http URL类似BNF的描述摘录:

url            = httpurl | ftpurl | newsurl |
                 nntpurl | telneturl | gopherurl |
                 waisurl | mailtourl | fileurl |
                 prosperourl | otherurl

httpurl        = "http://" hostport [ "/" hpath [ "?" search ]]
hpath          = hsegment *[ "/" hsegment ]
hsegment       = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
search         = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
请看以下描述:

统一资源定位器(URL),即 形式化语言的语法和语义 信息的位置和访问 通过互联网获取资源

以下是http URL类似BNF的描述摘录:

url            = httpurl | ftpurl | newsurl |
                 nntpurl | telneturl | gopherurl |
                 waisurl | mailtourl | fileurl |
                 prosperourl | otherurl

httpurl        = "http://" hostport [ "/" hpath [ "?" search ]]
hpath          = hsegment *[ "/" hsegment ]
hsegment       = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
search         = *[ uchar | ";" | ":" | "@" | "&" | "=" ]