Home  >  Q&A  >  body text

Question about judging IS_CGI using ThinkPHP.php in Thinkphp3.2.3

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

黄舟黄舟2668 days ago839

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-06-05 11:10:21

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

    reply
    0
  • Cancelreply