Source code:
define('IS_CGI', (0 === strpos(PHP_SAPI, 'cgi') || false !== strpos(PHP_SAPI, 'fcgi')) ? 1 : 0);
Can it be written directly:
define('IS_CGI', (false !== strpos(PHP_SAPI, 'cgi')) ? 1 : 0);
Because there are only three types of cgi:
cgi, cgi-fcgi, fpm-fcgi
You should submit an issue to its developer under thinkphp’s github project....