Changeset 17617


Ignore:
Timestamp:
2008/09/19 11:24:26 (18 years ago)
Author:
ramrun
Message:

#358 修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/LC_Page.php

    r17612 r17617  
    252252 
    253253        // HTML_PATH を削除した文字列を取得. 
    254         // FIXME OS依存の処理は別クラスに分ける? 
    255254        // Windowsの場合は, ディレクトリの区切り文字を\から/に変換する 
    256         if (substr(PHP_OS, 0, 3) == 'WIN') { 
    257             $realPath = str_replace("\\", "/", $realPath); 
    258             $htmlPath = str_replace("\\", "/", HTML_PATH); 
    259             $rootPath = str_replace($htmlPath, "", $realPath); 
    260         } else { 
    261             $htmlPath = rtrim(HTML_PATH, "/"); 
    262             $rootPath = str_replace($htmlPath, "", $realPath); 
    263             $rootPath = ltrim($rootPath, "/"); 
    264         } 
     255        $realPath = str_replace("\\", "/", $realPath); 
     256        $htmlPath = str_replace("\\", "/", HTML_PATH); 
     257         
     258        $htmlPath = rtrim($htmlPath, "/"); 
     259        $rootPath = str_replace($htmlPath, "", $realPath); 
     260        $rootPath = ltrim($rootPath, "/"); 
    265261         
    266262        return $rootPath; 
Note: See TracChangeset for help on using the changeset viewer.