On the WWW, every information resource has a unified and unique address on the Internet. This address is called a URL (Uniform Resource Locator, Uniform Resource Locator). It is the unified resource locator of WWW, which refers to the network address. (Recommended learning: phpstorm)
URL consists of three parts: resource type, host domain name where the resource is stored, and resource file name.
can also be considered to be composed of 4 parts: protocol, host, port, path
The general syntax format of URL is:
( Those with square brackets [] are optional):
protocol :// hostname[:port] / path / [;parameters][?query]#fragment
protocol
Specifies the transmission protocol used. The following table lists the valid scheme names for the protocol attribute. . The most commonly used protocol is HTTP, which is also the most widely used protocol in the WWW.
hostname
is the Domain Name System (DNS) hostname or IP address of the server where the resource is stored. Sometimes, the hostname can also be preceded by the username and password required to connect to the server (format: username:password@hostname).
port (port number)
Integer, optional, when omitted, the default port of the scheme is used. Various transmission protocols have default port numbers, such as http The default port is 80. If omitted on entry, the default port number is used. Sometimes for security or other considerations, the port can be redefined on the server, that is, a non-standard port number can be used. In this case, the port number cannot be omitted in the URL.
path (path)
A string separated by zero or more "/" symbols, generally used to represent a directory or file address on the host.
parameters
This is an optional option for specifying special parameters.
query(query)
Optional, used for dynamic web pages (such as those produced using CGI, ISAPI, PHP/JSP/ASP/ASP.NET and other technologies Web page) to pass parameters, there can be multiple parameters, separated by the "&" symbol, and the name and value of each parameter are separated by the "=" symbol.
fragment (information fragment)
String, used to specify the fragment in the network resource. For example, if there are multiple noun explanations in a web page, you can use fragment to directly locate a certain noun explanation.
The above is the detailed content of The composition format of url is. 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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Atom editor mac version download
The most popular open source editor

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.