mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-26 20:04:45 +01:00
2cdf37c8e2
Update response generation
14 lines
444 B
PHP
14 lines
444 B
PHP
<?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)
|
|
if (!getenv('SWOOLE_SERVER_ADDRESS')) {
|
|
Dotenv\Dotenv::create($root, '.env')->load();
|
|
}
|