diversen / get-url-part
This package is abandoned and no longer maintained.
No replacement package was suggested.
Very simple and minimal library to get a part of the URL from
v1.0.2
2017-04-26 19:04 UTC
This package is auto-updated.
Last update: 2021-07-20 10:17:10 UTC
README
Very simple and minimal PHP library to get a part of the URL from $_SERVER['REQUEST_URI']. No dependencies.
Install:
composer require diversen/get-url-part
Usage:
use diversen\urlPart
$urlPart = new urlPath();
$urlPArt->getPart(0); // Returns e.g. 'test' from http://localhost:8080/test/etc/
Or as a static method:
urlPart::get(0);
Test:
See index.php