Changeset 4336 for sandbox

Show
Ignore:
Timestamp:
07/01/2008 01:42:17 AM (2 months ago)
Author:
bnu
Message:

절대경로 반환이 제대로 처리되지 못하는 문제 수정

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • sandbox/classes/file/FileHandler.class.php

    r4335 r4336  
    1111 
    1212        /** 
    13          * @brief 대상 파일이름이나 디렉토리의 위치를 확인함 
     13         * @brief 대상 파일, 디렉토리의 절대경로를 반환 
    1414         **/ 
    1515        function getRealPath($source) { 
    16             if(substr($source,0,1)=='/') return $source; 
    17             if(substr($source,0,2)=='./') $source = substr($source,2); 
    18             return _XE_PATH_.$source; 
     16            $temp = explode('/', $source); 
     17            if($temp[0] == '.') $source = _XE_PATH_.substr($source, 2); 
     18            return $source; 
    1919        } 
    2020 
     
    204204            */ 
    205205 
    206             $header = sprintf("GET %s%s HTTP/1.0\r\nHost: %s\r\nAccept-Charset: utf-8;q=0.7,*;q=0.7\r\nReferer: %s://%s\r\nRequestUrl: %s\r\nConnection: Close\r\n\r\n", $url_info['path'], $url_info['query']?'?'.$url_info['query']:'', $url_info['host'], $url_info['scheme'], $url_info['host'], Context::getRequestUri());  
     206            $header = sprintf("GET %s%s HTTP/1.0\r\nHost: %s\r\nAccept-Charset: utf-8;q=0.7,*;q=0.7\r\nReferer: %s://%s\r\nRequestUrl: %s\r\nConnection: Close\r\n\r\n", $url_info['path'], $url_info['query']?'?'.$url_info['query']:'', $url_info['host'], $url_info['scheme'], $url_info['host'], Context::getRequestUri()); 
    207207 
    208208            @fwrite($fp, $header); 
     
    289289            // 원본 이미지의 타입으로 임시 이미지 생성 
    290290            switch($type) { 
    291                 case 'gif' :  
     291                case 'gif' : 
    292292                        $source = @imagecreatefromgif($source_file); 
    293293                    break; 
    294294                // jpg 
    295                 case 'jpeg' :  
    296                 case 'jpg' :  
     295                case 'jpeg' : 
     296                case 'jpg' : 
    297297                        $source = @imagecreatefromjpeg($source_file); 
    298298                    break; 
    299299                // png 
    300                 case 'png' :  
     300                case 'png' : 
    301301                        $source = @imagecreatefrompng($source_file); 
    302302                    break; 
    303303                // bmp 
    304                 case 'wbmp' :  
    305                 case 'bmp' :  
     304                case 'wbmp' : 
     305                case 'bmp' : 
    306306                        $source = @imagecreatefromwbmp($source_file); 
    307307                    break;