source: branches/feature-module-update/data/conf/conf.php @ 15722

Revision 15722, 2.2 KB checked in by nanasess, 16 years ago (diff)

ECCUBE_VERSION を conf.php に移動

  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/**
3 *
4 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
5 *
6 * http://www.lockon.co.jp/
7 *
8 */
9
10$CONF_PHP_PATH = realpath( dirname( __FILE__) );
11require_once($CONF_PHP_PATH ."/../install_mysql.php");
12require_once($CONF_PHP_PATH ."/core.php" );
13
14/**
15 * エラーレベル設定
16 *
17 * ・推奨値
18 *   開発時 - E_ALL
19 *   運用時 - E_ALL & ~E_NOTICE
20 */
21//error_reporting(E_ALL & ~E_NOTICE);
22error_reporting(E_ALL);
23
24// 定数を設定する
25defineConstants();
26
27/**
28 * マルチバイト文字列設定
29 *
30 * TODO SJIS-win や, eucJP-win への対応
31 */
32ini_set("mbstring.http_input", CHAR_CODE);
33ini_set("mbstring.http_output", CHAR_CODE);
34ini_set("auto_detect_line_endings", 1);
35ini_set("default_charset", CHAR_CODE);
36ini_set("mbstring.internal_encoding", CHAR_CODE);
37ini_set("mbstring.detect_order", "auto");
38ini_set("mbstring.substitute_character", "none");
39
40/** EC-CUBEのバージョン */
41define('ECCUBE_VERSION', "1.5");
42
43/**
44 * 定数を設定する.
45 *
46 * 注意: この関数を外部で使用することは推奨しません.
47 *
48 * mtb_constants.php を読み込んで定数を設定する.
49 * キャッシュディレクトリに存在しない場合は, 初期データからコピーする.
50 *
51 * @access private
52 * @return void
53 */
54function defineConstants() {
55    $CONF_PHP_PATH = realpath( dirname( __FILE__) );
56
57    $errorMessage = "data/conf/cache/mtb_constants.php が生成できません";
58    // 定数を設定
59    if (is_file($CONF_PHP_PATH . "/cache/mtb_constants.php")) {
60        require_once($CONF_PHP_PATH . "/cache/mtb_constants.php");
61
62    // キャッシュが無ければ, 初期データからコピー
63    } elseif (is_file($CONF_PHP_PATH
64                      . "/mtb_constants_init.php")) {
65
66        $mtb_constants = file_get_contents($CONF_PHP_PATH . "/mtb_constants_init.php");
67        $handle = fopen($CONF_PHP_PATH . "/cache/mtb_constants.php", "w");
68        if (!$handle) {
69            die($errorMessage);
70        }
71        if (fwrite($handle, $mtb_constants) === false) {
72            die($errorMessage);
73        }
74        fclose($handle);
75
76        require_once($CONF_PHP_PATH . "/cache/mtb_constants.php");
77    } else {
78        die("html/install/mtb_constants.php が存在しません.");
79    }
80}
81?>
Note: See TracBrowser for help on using the repository browser.