发送波斯语字符时,我遇到了$ _POST变量的问题
<?php
if (isset($_POST['caption'])){
$captione = $_POST['caption']; // I sent ض from form
$cap = str_replace('ض','you',$captione);
echo $captione.'<br>'; //output ض
echo $cap; //output ض
}else{
loginForm();
}
function loginForm(){
echo '<form id = "myform" action="t.php" method="POST">';
echo 'caption: <textarea id="user_data" name="caption" type="text" ></textarea>';
echo '<input type="submit" value="Send File" />';
echo '</form>';
}
?>
captione ==帽
str_replace
找不到字幕中的
但是当echo $_POST['caption']
输出是ض