1. Go to this page and download the library: Download axy/syspaths 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/ */
axy / syspaths example snippets
/* App init. __DIR__ is /www/example.loc */
use axy\syspaths\Paths;
$paths = new Paths(__DIR__, [
'htdocs' => 'www',
'source' => 'src',
'templates' => 'templates',
]);
/* Further */
$tplFN = $app->paths->templates.'/default.twig'; // /www/example.loc/templates/default.twig