update page now

Uri\WhatWg\Url::getPath

(PHP 8 >= 8.5.0)

Uri\WhatWg\Url::getPathRecupera el componente de ruta

Descripción

public Uri\WhatWg\Url::getPath(): string

Recupera el componente de ruta.

Parámetros

Esta función no contiene ningún parámetro.

Valores devueltos

Devuelve el componente de ruta como un string.

Ejemplos

Ejemplo #1 Ejemplo básico de Uri\WhatWg\Url::getPath()

<?php
$url
= new \Uri\WhatWg\Url("https://example.com/foo/bar");

echo
$url->getPath();
?>

El ejemplo anterior mostrará:

/foo/bar

Ver también

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top