Changeset 18633 for branches/comu-ver2/data/class/util/SC_Utils.php
- Timestamp:
- 2010/05/08 12:26:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/util/SC_Utils.php
r18625 r18633 78 78 // インストール済みが定義されていない。 79 79 if (!defined('ECCUBE_INSTALL')) { 80 // ここから2つ上はdataディレクトリ 81 $eccube_data_dir = realpath(dirname(__FILE__) . '/../../'); 82 // dataディレクトリとDATA_DIR2HTMLからhtmlディレクトリを取得。 83 $eccube_html_dir = realpath($eccube_data_dir . '/' . DATA_DIR2HTML); 84 // htmlディレクトリとDOCUMENT_ROOTの相対パスがURL_DIR 85 $document_root = realpath($_SERVER['DOCUMENT_ROOT']); 86 $url_dir = str_replace($document_root, '', $eccube_html_dir); 87 88 // installページへのURLを生成。 89 // Windowsの場合は, ディレクトリの区切り文字を\から/に変換する 90 $url_dir = str_replace("\\", "/", $url_dir); 91 // 先頭が'/'でない場合は'/'を付与。(php4,5のrealpathの挙動の違いによる) 92 if (substr($url_dir, 0, 1) != '/') { 93 $url_dir = '/' . $url_dir; 94 } 95 // 最後が'/'でない場合は'/'を付与。 96 if (substr($url_dir, -1) != '/') { 97 $url_dir .= '/'; 98 } 99 $location = $url_dir . 'install/index.php'; 100 101 header('Location: ' . $location); 80 header("Location: ./install/" . DIR_INDEX_URL); // TODO 絶対URL にする 102 81 exit; 103 82 }
Note: See TracChangeset
for help on using the changeset viewer.