From 79aa5d55fbc4823c4b97c4a402100fe55c0b84fb Mon Sep 17 00:00:00 2001 From: ThinkPHP Date: Thu, 18 Apr 2013 10:26:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9favicon.ico=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Think/App.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Think/App.php b/Library/Think/App.php index b58e22c4..f54ed106 100644 --- a/Library/Think/App.php +++ b/Library/Think/App.php @@ -160,6 +160,10 @@ class App { if(empty($_SERVER['PATH_INFO'])) { $_SERVER['PATH_INFO'] = ''; } + // 判断favicon.ico + if('/favicon.ico'==$_SERVER['PATH_INFO']){ + exit; + } $part = pathinfo($_SERVER['PATH_INFO']); define('__EXT__', isset($part['extension']) ? strtolower($part['extension']) : ''); $_SERVER['PATH_INFO'] = trim(preg_replace('/\.(' . trim($config['url_html_suffix'], '.') . ')$/i', '', $_SERVER['PATH_INFO']), '/');