PHP code example of palmiot / twig-extensions
1. Go to this page and download the library: Download palmiot/twig-extensions 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/ */
palmiot / twig-extensions example snippets
{{ "/www/htdocs/inc/lib.inc.php"|pathinfo('PATHINFO_DIRNAME') }} <!-- /www/htdocs/inc -->
{% set pathData = "/www/htdocs/inc/lib.inc.php"|pathinfo %}
{{ pathData.dirname }} <!-- /www/htdocs/inc -->