* support ansi escape codes for win 10 and up
 * also kill a warning
This commit is contained in:
Sarjuuk
2024-03-11 18:26:08 +01:00
parent 25b5928a22
commit c37d2fd594
2 changed files with 11 additions and 8 deletions

View File

@@ -12,9 +12,12 @@ else
mb_internal_encoding('UTF-8');
// OS_WIN as per compile info of php
define('OS_WIN', substr(PHP_OS, 0, 3) == 'WIN');
// WIN10 and later support ANSI escape sequences
define('CLI_HAS_E', !OS_WIN || version_compare(php_uname('r'), '10.0') >= 0);
require_once 'includes/defines.php';
require_once 'includes/libs/DbSimple/Generic.php'; // Libraray: http://en.dklab.ru/lib/DbSimple (using variant: https://github.com/ivan1986/DbSimple/tree/master)