URL

php\net\URL

Class URL

Methods


__construct($uri)
Параметры:
  • $uristring
openConnection($proxy)
Параметры:
Результат:

php\net\URLConnection

getAuthority()

Gets the authority part of this URL

Результат:string
getPort()
Результат:int
getDefaultPort()

Gets the default port number of the protocol associated with this URL. If the URL scheme or the URLStreamHandler for the URL do not define a default port number, then -1 is returned.

Результат:int
getProtocol()

Gets the protocol name of this URL

Результат:string
getHost()
Результат:string
getFile()

Gets the file name of this <code>URL</code>. The returned file portion will be the same as getPath(), plus the concatenation of the value of getQuery(), if any. If there is no query portion, this method and getPath() will return identical results.

Результат:string
getPath()
Результат:string
getQuery()
Результат:string
getRef()

Gets the anchor (also known as the “reference”) of this URL

Результат:string
sameFile($url)

Compares two URLs, excluding the fragment component.

Параметры:
Результат:

bool

toString()
Результат:string
toExternalForm()

Constructs a string representation of this URL. The string is created by calling the toExternalForm method of the stream protocol handler for this object.

Результат:string
openStream()
Результат:php\io\Stream
__toString()
Результат:string