Home  >  Article  >  Operation and Maintenance  >  What is the difference between URI and URL

What is the difference between URI and URL

云罗郡主
云罗郡主Original
2018-12-13 15:14:4412252browse


Many people can’t tell the difference between URI and URL. They all regard URI as URL. Let’s summarize what is the difference between URI and URL on php Chinese website?

What is the difference between URI and URL

1: What is the relationship between URI and URL

Both of them locate the location of the resource, and locate the location of the resource. , url is a broad definition, and URL is a subset of URI. URI contains URL, and the purpose of URI and URL is the same, both to identify resources through strings. [Recommended reading: What is URI

2: What is the difference between URI and URL

1. Different definitions

URL is a string representing the location of a resource. Generally, URI is a uniform resource identifier, which is used to identify a unique resource.

2. Different formats

The format of URL is protocol address: //ip/folder, while the format of URI is protocol://hostname[:port]/path/[; parameters][?query]#fragment.

Summary:

URIs are both relative and absolute. Generally, when we analyze string syntax, we do not need to consider the specified scheme, and we do not rely on the processing flow of the scheme, and A URI instance is similar to a string that relies on canonicalization. A URL is a URI that not only identifies a resource, but also provides information for locating the resource.

But the URL must be absolute. In general, that is, it must specify a scheme and the URL must be parsed. The URL is a structured string and supports syntax operations and I/O between networks. O operation.

The above is a complete introduction to the difference between URI and URL. If you want to know more about operation and maintenance knowledge, please pay attention to the php Chinese website.



The above is the detailed content of What is the difference between URI and URL. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is a URINext article:What is a URI