PHP code example of wesnick / drupal-bootstrap

1. Go to this page and download the library: Download wesnick/drupal-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/ */

    

wesnick / drupal-bootstrap example snippets


    

    new \Wesnick\DrupalBootstrap\Drupal7("/path/to/drupal");
    $drupal->doBootstrap();

    // Do stuff with Drupal API
    $node = node_load(1);