On the WWW, each information resource has a unified and unique address on the Internet. This address is called URL (Uniform Resource Locator, Uniform Resource Locator), which is WWW The Uniform Resource Locator indicates the network address.
URL consists of three parts: resource type, host domain name where the resource is stored, and resource file name.
The general syntax format of URL is:
(with square brackets [] is optional):
protocol ://hostname[:port] / path / [;parameters][?query]#fragment
1. Mode/protocol (scheme): It tells the browser how to handle the file to be opened. The most commonly used mode is the Hypertext Transfer Protocol (HTTP), which is used to access the Internet. Other protocols are as follows:
http——超文本传输协议资源 https——用安全套接字层传送的超文本传输协议 ftp——文件传输协议 mailto——电子邮件地址 ldap——轻型目录访问协议搜索 file——当地电脑或网上分享的文件 news——Usenet新闻组 gopher——Gopher协议 telnet——Telnet协议
2. The name or IP address of the server where the file is located, followed by the path to the file and the name of the file itself. The server name or IP address is sometimes followed by a colon and a port number. It may also contain the username and password required to contact the server. The path part contains the path definition of the hierarchical structure. Generally, different parts are separated by slashes (/). The query part is generally used to transmit the parameters required for dynamic query of the database on the server.
Example:
Assume this is a url address http://localhost:8080/a/b/c?a=1&b=2#abc, which contains:
protocol: 'http:',//协议 host: 'localhost:8080', port: '8080',//端口 hostname: 'localhost',域名 hash: '#abc', search: '?a=1&b=2' 等于 ?query: 'a=1&b=2', pathname: '/a/b/c', path: '/a/b/c?a=1&b=2', href: 'http://localhost:8080/a/b/c?a=1&b=2#abc'
The above is the detailed content of What does the content of the url include?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6
Visual web development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),