- 普通 - 未处理
TP中对于CGI运行环境的判断不够全面,对于fpm方式运行的php,就没法正确判断,导致在nginx+fpm的环境中生成的链接地址错误。可以修改一下ThinkPHP/Common/defines.php文件的31行:
-define('IS_CGI',substr(PHP_SAPI, 0,3)=='cgi' ? 1 : 0 );
+define('IS_CGI',(substr(PHP_SAPI, 0,3)=='cgi' || strpos(PHP_SAPI, 'fcgi') !== false) ? 1 : 0 );