PHP code example of nerd-components / path-utils
1. Go to this page and download the library: Download nerd-components/path-utils 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/ */
nerd-components / path-utils example snippets
use function Nerd\Utils\AbsolutePath\pathMaker;
$make = pathMaker('/some/root');
echo $make('file'); // /some/root/file
echo $make('../foo.txt'); // /some/foo.txt
echo $make('./other.txt'); // /some/root/other.txt