請問可以修改成中文不會變成亂碼

snoopy14789
我想修改成下面在網頁不會變成亂碼,然後至中對齊
Upload Image修改成(上傳檔案)
(選擇上傳)及(上傳檔案)是紅色字體
uploadform.html
<form action="uploader.php" method="post" enctype="multipart/form-data">
:
<input type="file" name="fileToUpload"/>
<input type="submit" value="" name="submit"/>
</form>
---------------------------------------------------------------------------
uploader.php
File uploaded successfully!修改成(您已經上傳成功!)
Sorry, file not uploaded, please try again!修改成(上傳失敗!)

<?php
$target_path = "D:/";
$target_path = $target_path.basename( $_FILES['fileToUpload']['name']);

if(move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $target_path)) {
echo "File uploaded successfully!";
} else{
echo "Sorry, file not uploaded, please try again!";
}
?>
---------------------------------------------------------------------------
拜託各位大大求解
在網頁會顯示亂碼,修改中文會無法上傳
想睡覺
uploadform.html

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(function()
{
	
	$("#upfile1").click(function () {
    $("#file1").trigger('click');
	});
	
});

</script>
<div align="center">

<form action="uploader.php" method="post" enctype="multipart/form-data">
<input type="file">
<input type="button" value="選擇上傳" style="color:red;" onclick="fileEle.click()" class="smt">
<input type="text" size="30" id="upfile" placeholder="未選擇任檔案" style="border:none;">   
<input type="file" id="fileEle" class="smt" style=" display:none" formmethod="POST" 
value="上傳檔案" onchange="upfile.value=this.value" name="fileToUpload">
  
<input type="submit" value="上傳檔案" style="color:red" name="submit"/>
</form>
</div>

 <div id="show"> 
<p> 
  
</p>
</div>



uploader.php


<?php
$target_path = "D:/";
$target_path = $target_path.basename( $_FILES['fileToUpload']['name']);

if(move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $target_path)) {
echo "您已經上傳成功!";
} else{
echo "上傳失敗!";
}
?>

請把檔案改為UTF-8
snoopy14789
請把檔案改為UTF-8
不好意思請問是什麼意思?
snoopy14789
還是會出現亂碼喔??
想睡覺
你把出現的亂碼貼出來 我看一下,
我說的檔案改UTF-8 是指編碼
回到頂部