Changeset 20246 for branches/version-2_5-dev/data/class/SC_CheckError.php
- Timestamp:
- 2011/02/20 12:03:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/SC_CheckError.php
r20090 r20246 621 621 $errFlag = 1; 622 622 $array_ext = explode(".", $_FILES[$value[1]]['name']); 623 $ext = $array_ext[ count ( $array_ext ) - 1 ];624 $ext = strtolower($ext);625 623 626 624 $strExt = ""; 627 625 628 626 foreach ( $value[2] as $checkExt ){ 627 $ext = ""; 628 629 // チェック拡張子のピリオドの数を取得('tar.gz'の場合1個、'jpg'のように通常は0個) 630 $count_period = substr_count($checkExt, "."); 631 632 if($count_period > 0) { 633 for($i = max(array_keys($array_ext)) - $count_period; $i < count($array_ext); $i++) { 634 $ext .= $array_ext[$i] . "."; 635 } 636 $ext = preg_replace("/.$/", "" ,$ext); 637 } else { 638 $ext = $array_ext[ count ( $array_ext ) - 1 ]; 639 } 640 641 $ext = strtolower($ext); 642 629 643 if ( $ext == $checkExt) { 630 644 $errFlag = 0;
Note: See TracChangeset
for help on using the changeset viewer.