diversen / get-url-part
Very simple and minimal library to get a part of the URL from
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/diversen/get-url-part
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