PHP code example of scholte / uri
1. Go to this page and download the library: Download scholte/uri library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
scholte / uri example snippets
use Scholte\Uri;
$uri = new Uri('scheme://user:[email protected]:80/path?parameter=value#fragment');
echo $uri->setScheme('https')->getUri(URI_STRIP_FRAGMENT);
// Output: https://user:[email protected]/path?parameter=value
$uri = new Uri('http://www.host.com/path');
echo $uri->getUri(URI_STRIP_SCHEME|URI_STRIP_HOST);
// Output: /path