Question about judging IS_CGI using ThinkPHP.php in Thinkphp3.2.3
黄舟
黄舟 2017-06-05 11:08:21
0
1
934

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

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
小葫芦

You should submit an issue to its developer under thinkphp’s github project....

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template