PHP code example of fusionary / craftcms-bootstrap
1. Go to this page and download the library: Download fusionary/craftcms-bootstrap 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/ */
fusionary / craftcms-bootstrap example snippets
nary\craftcms\bootstrap\Bootstrap::run();
nary\craftcms\bootstrap\Bootstrap
->setDepth(2) // Set the depth of this script from your project root (`CRAFT_BASE_PATH`) to determine paths
->setSite('site-handle') // If the containing folder matches the site handle, you could dynamically set this with `basename(__DIR__)`
->run();
Bootstrap::run('console')->setDepth(0)->run()); // Override the default depth of 1, since this script is in `@root`.