response.php 拡張子:txtvbswsfjsphpjavahtmlutf8sjis <? header( "Content-Type: text/html; Charset=utf-8" ); header( "pragma: no-cache" ); header( "Expires: Wed, 31 May 2000 14:59:58 GMT" ); header( "Cache-control: no-cache" ); mb_language( "ja" ); mb_internal_encoding("UTF-8"); // Windows 用として CRLF $text .= $_GET['fld1']."\r\n"; $text .= $_GET['fld2']."\r\n"; $utf8 = $text; // 書き込みは Windows 用として SHIFT_JIS $text = mb_convert_encoding( $text, "SHIFT_JIS", "UTF-8" ); file_put_contents( $_GET['fld1'].".txt", $text ); // Flex は utf-8 なので、変換前を返す print_r($utf8); ?> Flex4 : HTTPService で入力データを PHP に送る
<? header( "Content-Type: text/html; Charset=utf-8" ); header( "pragma: no-cache" ); header( "Expires: Wed, 31 May 2000 14:59:58 GMT" ); header( "Cache-control: no-cache" ); mb_language( "ja" ); mb_internal_encoding("UTF-8"); // Windows 用として CRLF $text .= $_GET['fld1']."\r\n"; $text .= $_GET['fld2']."\r\n"; $utf8 = $text; // 書き込みは Windows 用として SHIFT_JIS $text = mb_convert_encoding( $text, "SHIFT_JIS", "UTF-8" ); file_put_contents( $_GET['fld1'].".txt", $text ); // Flex は utf-8 なので、変換前を返す print_r($utf8); ?>