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__) ); |
---|
11 | require_once($CONF_PHP_PATH ."/../install_mysql.php"); |
---|
12 | require_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); |
---|
22 | error_reporting(E_ALL); |
---|
23 | |
---|
24 | // 定数を設定する |
---|
25 | defineConstants(); |
---|
26 | |
---|
27 | /** |
---|
28 | * マルチバイト文字列設定 |
---|
29 | * |
---|
30 | * TODO SJIS-win や, eucJP-win への対応 |
---|
31 | */ |
---|
32 | ini_set("mbstring.http_input", CHAR_CODE); |
---|
33 | ini_set("mbstring.http_output", CHAR_CODE); |
---|
34 | ini_set("auto_detect_line_endings", 1); |
---|
35 | ini_set("default_charset", CHAR_CODE); |
---|
36 | ini_set("mbstring.internal_encoding", CHAR_CODE); |
---|
37 | ini_set("mbstring.detect_order", "auto"); |
---|
38 | ini_set("mbstring.substitute_character", "none"); |
---|
39 | |
---|
40 | /** EC-CUBEのバージョン */ |
---|
41 | define('ECCUBE_VERSION', "1.5"); |
---|
42 | |
---|
43 | /** |
---|
44 | * 定数を設定する. |
---|
45 | * |
---|
46 | * 注意: この関数を外部で使用することは推奨しません. |
---|
47 | * |
---|
48 | * mtb_constants.php を読み込んで定数を設定する. |
---|
49 | * キャッシュディレクトリに存在しない場合は, 初期データからコピーする. |
---|
50 | * |
---|
51 | * @access private |
---|
52 | * @return void |
---|
53 | */ |
---|
54 | function 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 | ?> |
---|