tools에 위치한 프로그램을 실행시 getScriptPath()가 오동작하는 것을 막는 코드 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4375 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-07-16 10:16:39 +00:00
parent f1a891558e
commit 349b25586c

View file

@ -515,7 +515,7 @@
**/
function getScriptPath() {
static $url = null;
if($url == null) $url = preg_replace('/index.php$/i','',str_replace('\\','/',$_SERVER['SCRIPT_NAME']));
if($url == null) $url = preg_replace('/\/tools\/([a-z\_]+)/i','',preg_replace('/index.php$/i','',str_replace('\\','/',$_SERVER['SCRIPT_NAME'])));
return $url;
}