[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/includes/ -> load-yourls.php (source)

   1  <?php
   2  /* Bootstrap YOURLS
   3   *
   4   * This file initialize everything needed for YOURLS
   5   * If you need to bootstrap YOURLS (ie access its functions and features) simply include this file.
   6   */
   7  
   8  require  __DIR__ . '/vendor/autoload.php';
   9  
  10  // Set up YOURLS config
  11  
  12  $config = new \YOURLS\Config\Config;
  13  /* The following require has to be at global level so the variables inside config.php, including user defined if any,
  14   * are registered in the global scope. If this require is moved in \YOURLS\Config\Config, $yourls_user_passwords for
  15   * instance isn't registered.
  16   */
  17  if (!defined('YOURLS_CONFIGFILE')) {
  18      define('YOURLS_CONFIGFILE', $config->find_config());
  19  }
  20  require_once YOURLS_CONFIGFILE;
  21  $config->define_core_constants();
  22  
  23  // Initialize YOURLS with default behaviors
  24  
  25  $init_defaults = new \YOURLS\Config\InitDefaults;
  26  new \YOURLS\Config\Init($init_defaults);


Generated: Sat Feb 22 05:10:06 2025 Cross-referenced by PHPXref 0.7.1