关于“url_解码_php”的问题,小编就整理了【1】个相关介绍“url_解码_php”的解答:
url加密和解密方案?package day11.about_url_encoder;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
public class URLEncoder_URLDecoder_Demo {
public static void main(String[] args) throws UnsupportedEncodingException {
// URLEncoder类:URL的加密类
String str = "高级";
// gbk的编码两位一组:所以这儿有四组百分号
// str = URLEncoder.encode(str, "gbk"); // %B4%AB%D6%C7
// utf-8的编码三位一组:所以这里有六组百分号
str = URLEncoder.encode(str, "utf-8"); // %E4%BC%A0%E6%99%BA
System.out.println(str);
到此,以上就是小编对于“url_解码_php”的问题就介绍到这了,希望介绍关于“url_解码_php”的【1】点解答对大家有用。