■PHP側の処理例
<?php
$filename = $_POST['filename'];
$result = '';
$fp = fopen($filename, 'r'); for ($i=2; $buffer = fgets($fp, 1024); $i++) { $buffer = mb_convert_encoding($buffer, 'UTF-8', 'SJIS'); $data = explode(',', $buffer);
$result .= $data[0] . ' ' . $data[1];
・・・・(出力内容の編集など)
}
//URIエンコード //$result = rawurlencode($result);
//出力charsetをut-8に mb_http_output ( 'UTF-8' );
//ヘッダ header ("Content-Type: text/html; charset=utf-8"); echo($result);
?>
|
|
|