PHP code example of germania-kg / pathprefixer
1. Go to this page and download the library: Download germania-kg/pathprefixer 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/ */
germania-kg / pathprefixer example snippets
use Germania\PathPrefixer\PathPrefixer;
// Root will default to getcwd()
$prefixer = new PathPrefixer( '/path/to/root' );
echo $prefixer('templates');
// Result: "/path/to/root/templates"
// Try on array:
$result = $prefixer([
'foo' => '
$prefixer = new PathPrefixer( '/path/to/root', "@" );
echo $prefixer('templates');
// Result: "/path/to/root@templates"