Changeset 18569 for branches/comu-ver2
- Timestamp:
- 2010/02/16 13:30:37 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/util/SC_Utils.php
r18566 r18569 84 84 // htmlディレクトリとDOCUMENT_ROOTの相対パスがURL_DIR 85 85 $document_root = realpath($_SERVER['DOCUMENT_ROOT']); 86 $url_dir = preg_replace('|^' . preg_quote($document_root) . '|', '', $eccube_html_dir); 86 $url_dir = str_replace($document_root, '', $eccube_html_dir); 87 87 88 // installページへのURLを生成。 88 $location = realpath('/' . $url_dir . '/install/index.php'); 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'; 89 100 90 101 header('Location: ' . $location);
Note: See TracChangeset
for help on using the changeset viewer.