1. Go to this page and download the library: Download omissis/bundlefu 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/ */
$bundle = new \DotsUnited\BundleFu\Bundle();
$bundle
// Set the document root
->setDocRoot('/path/to/your/document_root')
// Set the css cache path (relative to the document root)
->setCssCachePath('css/cache')
// Set the javascript cache path (relative to the document root)
->setJsCachePath('js/cache');
// Renders both <script> and <link> tags
echo $bundle->render();
// Renders the <link> tag only
echo $bundle->renderCss();
// Renders the <script> tag only
echo $bundle->renderJs();
$options = array(
'doc_root' => '/path/to/your/document_root',
'css_cache_path' => 'css/cache',
'js_cache_path' => 'js/cache',
);
$factory = new \DotsUnited\BundleFu\Factory($options);
// $bundle1 and $bundle2 use the same doc_root, css_cache_path and js_cache_path options
$bundle1 = $factory->createBundle();
$bundle2 = $factory->createBundle();