Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 1020B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file index.php
  4. * Friendica
  5. */
  6. use Friendica\App;
  7. use Friendica\Core\Config\Cache;
  8. use Friendica\Factory;
  9. use Friendica\Util\BasePath;
  10. if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
  11. die('Vendor path not found. Please execute "bin/composer.phar --no-dev install" on the command line in the web root.');
  12. }
  13. require __DIR__ . '/vendor/autoload.php';
  14. $basedir = BasePath::create(__DIR__, $_SERVER);
  15. $configLoader = new Cache\ConfigCacheLoader($basedir);
  16. $configCache = Factory\ConfigFactory::createCache($configLoader);
  17. Factory\DBFactory::init($configCache, $_SERVER);
  18. $config = Factory\ConfigFactory::createConfig($configCache);
  19. $pconfig = Factory\ConfigFactory::createPConfig($configCache);
  20. $logger = Factory\LoggerFactory::create('index', $config);
  21. $profiler = Factory\ProfilerFactory::create($logger, $config);
  22. // We assume that the index.php is called by a frontend process
  23. // The value is set to "true" by default in App
  24. $a = new App($config, $logger, $profiler, false);
  25. $a->runFrontend();