Changeset 18564
- Timestamp:
- 2010/02/15 16:29:57 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_4-dev/data/class/util/SC_Utils.php
r18493 r18564 84 84 // インストールページに遷移させる 85 85 86 $script_filename = $_SERVER['SCRIPT_FILENAME']; 87 list($real_root, $tmp) = explode('/html/', $script_filename); 88 $real_root = $real_root . '/html/'; 89 $script_name = $_SERVER['SCRIPT_NAME']; 90 $url_dir = rtrim($script_name, basename($script_name)); 91 92 if ($dh = opendir($real_root)) { 93 $arrDir = array(); 94 while ($entry = readdir($dh)) { 95 if (is_dir($real_root.$entry) && !in_array($entry, array('.', '..', '.svn', 'install'))) { 96 $url_dir = rtrim($url_dir, $entry.'/'); 97 } 98 } 99 closedir($dh); 100 } 101 102 $location = $url_dir . '/install/'; 86 // ここから2つ上はdataディレクトリ 87 $eccube_data_dir = realpath(dirname(__FILE__) . '/../../'); 88 // dataディレクトリとDATA_DIR2HTMLからhtmlディレクトリを取得。 89 $eccube_html_dir = realpath($eccube_data_dir . DATA_DIR2HTML); 90 // htmlディレクトリとDOCUMENT_ROOTの相対パスがURL_DIR 91 $url_dir = preg_replace('|^' . preg_quote($_SERVER['DOCUMENT_ROOT']) . '|', '', $eccube_html_dir); 92 // installページへのURLを生成。 93 $location = realpath('/' . $url_dir . '/install/index.php'); 94 103 95 header('Location: ' . $location); 104 96 exit;
Note: See TracChangeset
for help on using the changeset viewer.