TelegramApiServer/bootstrap.php

14 lines
444 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-03-19 00:36:20 +01:00
if (!getenv('SWOOLE_SERVER_ADDRESS')) {
2019-05-15 00:31:11 +02:00
Dotenv\Dotenv::create($root, '.env')->load();
}