TelegramApiServer/bootstrap.php

14 lines
438 B
PHP
Raw Normal View History

<?php
//Check if autoload has been already loaded (in case plugin installed in existing project)
$root = __DIR__;
if (!file_exists($root . '/vendor/autoload.php')) {
$root = __DIR__ . '/../../..';
}
require_once $root . '/vendor/autoload.php';
chdir($root);
//Check if root env file hash been loaded (in case plugin installed in existing project)
2019-06-20 18:51:58 +02:00
if (!getenv('SERVER_ADDRESS')) {
2019-12-31 23:44:44 +01:00
Dotenv\Dotenv::createImmutable($root)->load();
}