Changeset 18568 for branches/version-2_4-dev
- Timestamp:
- 2010/02/16 13:22:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_4-dev/data/class/util/SC_Utils.php
r18567 r18568 90 90 // htmlディレクトリとDOCUMENT_ROOTの相対パスがURL_DIR 91 91 $document_root = realpath($_SERVER['DOCUMENT_ROOT']); 92 $url_dir = preg_replace('|^' . preg_quote($document_root) . '|', '', $eccube_html_dir); 92 $url_dir = str_replace($document_root, '', $eccube_html_dir); 93 93 94 // installページへのURLを生成。 94 $location = realpath('/' . $url_dir . '/install/index.php'); 95 // Windowsの場合は, ディレクトリの区切り文字を\から/に変換する 96 $url_dir = str_replace("\\", "/", $url_dir); 97 // 先頭が'/'でない場合は'/'を付与。(php4,5のrealpathの挙動の違いによる) 98 if (substr($url_dir, 0, 1) != '/') { 99 $url_dir = '/' . $url_dir; 100 } 101 // 最後が'/'でない場合は'/'を付与。 102 if (substr($url_dir, -1) != '/') { 103 $url_dir .= '/'; 104 } 105 $location = $url_dir . 'install/index.php'; 95 106 96 107 header('Location: ' . $location);
Note: See TracChangeset
for help on using the changeset viewer.