Attributes[ $attName ] ) ) return $defValue ; return $element->Attributes[ $attName ] ; } function CreateDir($path, $rights = 0777) { $dirParts = explode( '/', $path ) ; $currentDir = '' ; foreach ( $dirParts as $dirPart ) { $currentDir .= $dirPart . '/' ; if ( strlen( $dirPart ) > 0 && !is_dir( $currentDir ) ) mkdir( $currentDir, $rights ) ; } } function SaveStringToFile( $strData, $filePath, $includeUtf8Bom = FALSE ) { $f = fopen( $filePath, 'wb' ) ; if ( !$f ) return FALSE ; if ( $includeUtf8Bom ) fwrite( $f, "\xEF\xBB\xBF" ) ; // BOM fwrite( $f, StripUtf8Bom( $strData ) ) ; fclose( $f ) ; return TRUE ; } function StripUtf8Bom( $data ) { if ( substr( $data, 0, 3 ) == "\xEF\xBB\xBF" ) return substr_replace( $data, '', 0, 3 ) ; return $data ; } function GetMicrotime() { $timeParts = explode( ' ', microtime() ) ; return $timeParts[0] + $timeParts[1] ; } ?>