Changeset 16506 for branches/feature-module-update/html/install/index.php
- Timestamp:
- 2007/10/19 16:27:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/html/install/index.php
r16313 r16506 32 32 33 33 if(!is_writable($temp_dir)) { 34 SC_Utils_Ex::sfErrorHeader($temp_dir . "にユーザ書込み権限(777 等)を付与して下さい。", true);34 SC_Utils_Ex::sfErrorHeader($temp_dir . "にユーザ書込み権限(777, 707等)を付与して下さい。", true); 35 35 exit; 36 36 } … … 374 374 "../cp", 375 375 "../upload", 376 ".." . HTML2DATA_DIR . " Smarty/templates_c",377 ".." . HTML2DATA_DIR . "c onf/cache",378 ".." . HTML2DATA_DIR . " downloads",379 ".." . HTML2DATA_DIR . " logs"376 ".." . HTML2DATA_DIR . "cache/", 377 ".." . HTML2DATA_DIR . "class/", 378 ".." . HTML2DATA_DIR . "Smarty/", 379 ".." . HTML2DATA_DIR . "downloads/" 380 380 ); 381 381 … … 383 383 $err_file = false; 384 384 foreach($arrWriteFile as $val) { 385 if(file_exists($val)) { 386 $mode = lfGetFileMode($val); 387 $real_path = realpath($val); 388 389 // ディレクトリの場合 390 if(is_dir($val)) { 391 if(is_writable($val)) { 392 $mess.= ">> ○:$real_path($mode) <br>アクセス権限は正常です。<br>"; 385 386 $arrDirs = listdirs($val); 387 foreach ($arrDirs as $path) { 388 if(file_exists($path)) { 389 $mode = lfGetFileMode($path); 390 $real_path = realpath($path); 391 392 // ディレクトリの場合 393 if(is_dir($path)) { 394 if(is_writable($path)) { 395 //$mess.= ">> ○:$real_path($mode) <br>アクセス権限は正常です。<br>"; 396 } else { 397 $mess.= ">> ×:$real_path($mode) <br>ユーザ書込み権限(777, 707等)を付与して下さい。<br>"; 398 $err_file = true; 399 } 393 400 } else { 394 $mess.= ">> ×:$real_path($mode) <br>ユーザ書込み権限(777等)を付与して下さい。<br>"; 395 $err_file = true; 401 if(is_writable($path)) { 402 //$mess.= ">> ○:$real_path($mode) <br>アクセス権限は正常です。<br>"; 403 } else { 404 $mess.= ">> ×:$real_path($mode) <br>ユーザ書込み権限(666, 606等)を付与して下さい。<br>"; 405 $err_file = true; 406 } 396 407 } 397 408 } else { 398 if(is_writable($val)) { 399 $mess.= ">> ○:$real_path($mode) <br>アクセス権限は正常です。<br>"; 400 } else { 401 $mess.= ">> ×:$real_path($mode) <br>ユーザ書込み権限(666等)を付与して下さい。<br>"; 402 $err_file = true; 403 } 409 $mess.= ">> ×:$path が見つかりません。<br>"; 410 $err_file = true; 404 411 } 405 } else {406 $mess.= ">> ×:$val が見つかりません。<br>";407 $err_file = true;408 412 } 409 413 } … … 451 455 mkdir($path); 452 456 } 457 $mess.= ">> ○:アクセス権限は正常です。<br>"; 453 458 } 454 459 … … 1045 1050 $objDb->sfDataExists("dtb_csv", "csv_id = ? AND col = ?", array($csv_id, $col), $dsn, $sql, true); 1046 1051 } 1052 1053 /** 1054 * $dir を再帰的に辿ってパス名を配列で返す. 1055 * 1056 * @param string 任意のパス名 1057 * @return array $dir より下層に存在するパス名の配列 1058 * @see http://www.php.net/glob 1059 */ 1060 function listdirs($dir) { 1061 static $alldirs = array(); 1062 $dirs = glob($dir . '/*'); 1063 if (count($dirs) > 0) { 1064 foreach ($dirs as $d) $alldirs[] = $d; 1065 } 1066 foreach ($dirs as $dir) listdirs($dir); 1067 return $alldirs; 1068 } 1047 1069 ?>
Note: See TracChangeset
for help on using the changeset viewer.