Changeset 16304
- Timestamp:
- 2007/10/06 21:46:53 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/conf/conf.php
r16293 r16304 59 59 function defineConstants() { 60 60 $CONF_PHP_PATH = realpath( dirname( __FILE__) ); 61 $errorMessage = "data/conf/cache/mtb_constants.php が生成できません\n" 62 . "data/conf/cache/にユーザ書込み権限(777等)を付与して下さい。"; 61 $errorMessage = "<div style='color: #F00; font-weight: bold; " 62 . "background-color: #FEB; text-align: center'>" 63 . $CONF_PHP_PATH 64 . "/cacheにユーザ書込み権限(777等)を付与して下さい。</div>"; 65 63 66 // 定数を設定 64 67 if (is_file($CONF_PHP_PATH . "/cache/mtb_constants.php")) { … … 70 73 71 74 $mtb_constants = file_get_contents($CONF_PHP_PATH . "/mtb_constants_init.php"); 72 $handle = fopen($CONF_PHP_PATH . "/cache/mtb_constants.php", "w"); 73 if (!$handle) { 75 if (is_writable($CONF_PHP_PATH . "/cache/")) { 76 $handle = fopen($CONF_PHP_PATH . "/cache/mtb_constants.php", "w"); 77 if (!$handle) { 78 die($errorMessage); 79 } 80 if (fwrite($handle, $mtb_constants) === false) { 81 die($errorMessage); 82 } 83 fclose($handle); 84 85 require_once($CONF_PHP_PATH . "/cache/mtb_constants.php"); 86 } else { 74 87 die($errorMessage); 75 88 } 76 if (fwrite($handle, $mtb_constants) === false) {77 die($errorMessage);78 }79 fclose($handle);80 81 require_once($CONF_PHP_PATH . "/cache/mtb_constants.php");82 89 } else { 83 90 die($CONF_PHP_PATH . "/mtb_constants_init.php");
Note: See TracChangeset
for help on using the changeset viewer.