Changeset 18566 for branches/comu-ver2


Ignore:
Timestamp:
2010/02/15 18:44:53 (14 years ago)
Author:
shutta
Message:

#603 を反映。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/util/SC_Utils.php

    r18489 r18566  
    7878        // インストール済みが定義されていない。 
    7979        if (!defined('ECCUBE_INSTALL')) { 
    80             header("Location: ./install/" . DIR_INDEX_URL); // TODO 絶対URL にする 
     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 = preg_replace('|^' . preg_quote($document_root) . '|', '', $eccube_html_dir); 
     87            // installページへのURLを生成。 
     88            $location = realpath('/' . $url_dir . '/install/index.php'); 
     89 
     90            header('Location: ' . $location); 
    8191            exit; 
    8292        } 
Note: See TracChangeset for help on using the changeset viewer.