Java サーブレット Web アプリケーションを php に変換しています。
次の Java コマンドを php に変換するにはどうすればよいですか?
String temp = request.getParameter("q");
String temp2 = URLDecoder.decode(temp, "UTF-8");
どんな助けでも大歓迎です...
編集:
これはクライアント コードです。
var myJSONText = playlist.serialize();
$.ajax({
type : 'POST',
url : "playlisthandler.php",
data : {
"q" : encodeURIComponent(myJSONText)
},
success : function(response) { ... },
error : function(response) { ... },
dataType : "json"
});
encodeURIComponent が冗長であると言っていますか?