get_skin_stylesheet 함수에 realpath 함수를 적용해 OS 디렉토리 구분자처리

This commit is contained in:
chicpro
2013-03-13 10:43:12 +09:00
parent 176cfad807
commit 5daf35f2fa

View File

@ -1795,13 +1795,16 @@ function get_skin_stylesheet($skin_path)
if(!$skin_path)
return "";
$doc_root = realpath($_SERVER['DOCUMENT_ROOT']);
$skin_path = realpath($skin_path);
$str = "";
$p = parse_url(G4_URL);
$skin_url = $p['scheme'].'://'.$p['host'];
if(isset($p['port']))
$skin_url .= ':'.$p['port'];
$skin_url .= str_replace($_SERVER['DOCUMENT_ROOT'], "", $skin_path);
$skin_url .= str_replace("\\", "/", str_replace($doc_root, "", $skin_path));
if(is_dir($skin_path)) {
if($dh = opendir($skin_path)) {