-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtfa.php
More file actions
42 lines (35 loc) · 1.13 KB
/
tfa.php
File metadata and controls
42 lines (35 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/*
* This file is part of the Term Frequency Analyzer.
*
* (c) Alexander Smyslov <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
$bootstrap = 'src' . DIRECTORY_SEPARATOR . 'bootstrap.php';
$autoload = 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
$download = 'https://getcomposer.org/download/';
if (!is_file($bootstrap)) {
fprintf(
STDERR,
"\e[0;31m" . "Error: can't find `" . $bootstrap . '` file.' . "\e[0m" . PHP_EOL
. 'Check the integrity of the project or try `git pull` command.' . PHP_EOL
);
exit(1);
}
if (!is_file($autoload)) {
fprintf(
STDERR,
"\e[0;31m" . "Error: can't find `" . $autoload . '` file.' . "\e[0m" . PHP_EOL
. 'You must install composer ' . $download
. " and use `composer install` command in the project's root folder." . PHP_EOL
);
exit(1);
}
require_once $autoload;
require_once $bootstrap;