-1
我想傳遞的S值包含非英文字符串
....
$.post("ajax.php?module=test&action=updates&id="+id+"&field="+field+"&val="+sValue;
...
然後
$valUpdate = $_GET['val'];
$sQuery = " UPDATE $sTable SET $colUpdate = '$valUpdate' WHERE id = $id";
$req = $pdo->prepare($sQuery);
$req->execute();
$req->closeCursor();
任何人都可以告訴我,我該如何解決這個問題?
謝謝
'encodeURIComponent(sValue)' – Wrikken
也許這將幫助你:http://stackoverflow.com/questions/834316/how-to-convert-large-utf-8-strings-into-ascii –
你正在使用使用GET參數的'$ .post'。只需要設置POST參數。 – sp00m