thinkphp icon indicating copy to clipboard operation
thinkphp copied to clipboard

ThinkPHP.php文件判断CGI的一点小疑问

Open ansionfor opened this issue 8 years ago • 0 comments

原代码:define('IS_CGI', (0 === strpos(PHP_SAPI, 'cgi') || false !== strpos(PHP_SAPI, 'fcgi')) ? 1 : 0);

可不可以写成:define('IS_CGI', ( false !== strpos(PHP_SAPI, ‘cgi')) ? 1 : 0);

省略第一个判断?

ansionfor avatar May 31 '17 07:05 ansionfor