PHP code example of mikefunk / bustersphp
1. Go to this page and download the library: Download mikefunk/bustersphp 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/ */
mikefunk / bustersphp example snippets
use MikeFunk\BustersPhp\BustersPhp;
// optional config array - if you want to set a custom config
$config = array(
'rootPath' => '//'.$_SERVER['HTTP_HOST'],
'cssTemplate' => '<link href="{{ROOT_PATH}}/{{FILE_PATH}}/{{FILE_NAME}}.{{HASH}}.css" rel="stylesheet">',
'jsTemplate' => '<script src="{{ROOT_PATH}}/{{FILE_PATH}}/{{FILE_NAME}}.{{HASH}}.js"></script>',
'bustersJsonPath' => $_SERVER['DOCUMENT_ROOT'].'/assets/cache/busters.json',
);
$bustersPhp = new BustersPhp($config);
<!-- css link tagss -->
<?=$bustersPhp->css()
<?=$bustersPhp->assets()