Changeset 18562 for trunk/data/class/util/SC_Utils.php
- Timestamp:
- 2010/02/12 18:46:50 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/class/util/SC_Utils.php
r18432 r18562 83 83 if( !ereg('/install/', $_SERVER['PHP_SELF']) ) { 84 84 // インストールページに遷移させる 85 header('Location: ./install/'); 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/'; 103 header('Location: ' . $location); 86 104 exit; 87 105 }
Note: See TracChangeset
for help on using the changeset viewer.