Changeset 226 for FCKreleaser/trunk/_source/includes/fckpackager/common.inc
- Timestamp:
- 2007-03-27 17:58:03 (17 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKreleaser/trunk/_source/includes/fckpackager/common.inc
r159 r226 29 29 function StrEndsWith( $str, $sub ) 30 30 { 31 return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ;31 return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ; 32 32 } 33 33 … … 43 43 { 44 44 $dirParts = explode( '/', $path ) ; 45 45 46 46 $currentDir = '' ; 47 47 … … 49 49 { 50 50 $currentDir .= $dirPart . '/' ; 51 51 52 52 if ( strlen( $dirPart ) > 0 && !is_dir( $currentDir ) ) 53 53 mkdir( $currentDir, $rights ) ; … … 65 65 fwrite( $f, "\xEF\xBB\xBF" ) ; // BOM 66 66 67 fwrite( $f, $strData ) ; 68 fclose( $f ) ; 69 70 return TRUE ; 71 } 72 73 function SaveStringToUtf8File( $strData, $filePath, $includeBom = TRUE ) 74 { 75 $f = @fopen( $filePath, 'wb' ) ; 76 77 if ( !$f ) 78 return FALSE ; 79 80 if ( $includeBom ) 81 fwrite( $f, "\xEF\xBB\xBF" ) ; // BOM 82 83 fwrite( $f, ( $strData ) ) ; 84 67 fwrite( $f, StripUtf8Bom( $strData ) ) ; 85 68 fclose( $f ) ; 86 69