PHPのfopenを使ってテキストファイルの読みこみをしようと考えているのですが、
文字化けしてしまって困っています...
--PHP
<?php if (! ($fp = fopen ( "A4_B5.txt", "r" ))) { echo "ファイルが開けません。"; } while (! feof ($fp)) { $load = fgets ($fp, 4096); echo $load; } fclose ($fp) ?>---js
function Read_File(){
$.ajax({ type: "POST", url: "js/TextRead.php", data: "sampleVal1=test&sampleVal2=hoge", success: function(html){ alert(html); $(".read_text").text(html); } });
}
---HTML
<meta content="text/html; charset=shift_jis" http-equiv="Content-Type">
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/11/19 09:54
2015/11/19 11:03
2015/11/19 11:38
2015/11/19 12:07