ファイルバスをjavascriptからphpファイルに渡してファイルのサイズを取得しようとしていますが、結果を返します。問題は、javascriptが次の例としてファイルバスを渡すことです。間違ったパスなので、常に false を返します!!!
$(document).ready(function (){
$("#file").click(function (){
fileBath=$("#name").val();
$.get('newfile2.php','fileBath='+fileBath,function(data){
alert(data);
});
});
});
phpファイル
getmax($_GET['fileBath']);
function getmax($fileBath){
$value=filesize($fileBath);
echo $value;
}
ファイルバスが間違っているため、phpファイルの戻り値FALSEと言ったように!!