Issues (5)

install.php (1 issue)

Labels
Severity
1
<?php
2
3
//Create src/api directory
4
echo ' >> Create src/api directory ... ';
5
6
if (file_exists(SRC_DIR.'api/')) {
0 ignored issues
show
The constant SRC_DIR was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
7
    echo "\033[1;33mAlready exist.\033[0m";
8
    return;
9
}
10
    
11
if (mkdir(SRC_DIR.'api/', 0755)) {
12
    echo "\033[1;32mCreated.\033[0m\n";
13
    return;
14
}
15
16
//If error during the directory creation
17
trigger_error(
18
    'Module '.$this->name.' install error : Fail to create /src/api/ directory',
19
    E_USER_WARNING
20
);
21
echo "\033[1;31mFail.\033[0m\n";
22