From 6d3bbbe36db6646884656d65ccf658ae5cce0716 Mon Sep 17 00:00:00 2001 From: ThinkPHP Date: Thu, 18 Apr 2013 12:03:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=5F=5FEXT=5F=5F=E5=B8=B8?= =?UTF-8?q?=E9=87=8F=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Think/App.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Think/App.php b/Library/Think/App.php index f54ed106..df60cb3d 100644 --- a/Library/Think/App.php +++ b/Library/Think/App.php @@ -164,8 +164,8 @@ class App { if('/favicon.ico'==$_SERVER['PATH_INFO']){ exit; } - $part = pathinfo($_SERVER['PATH_INFO']); - define('__EXT__', isset($part['extension']) ? strtolower($part['extension']) : ''); + // URL后缀 + define('__EXT__', strtolower(pathinfo($_SERVER['PATH_INFO'],PATHINFO_EXTENSION))); $_SERVER['PATH_INFO'] = trim(preg_replace('/\.(' . trim($config['url_html_suffix'], '.') . ')$/i', '', $_SERVER['PATH_INFO']), '/'); if($_SERVER['PATH_INFO']) { $paths = explode($config['pathinfo_depr'], $_SERVER['PATH_INFO']);