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